projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8442358
)
fix alignment logic in strlcpy
author
Rich Felker
<dalias@aerifal.cx>
Thu, 27 Dec 2012 04:48:02 +0000
(23:48 -0500)
committer
Rich Felker
<dalias@aerifal.cx>
Thu, 27 Dec 2012 04:48:02 +0000
(23:48 -0500)
src/string/strlcpy.c
patch
|
blob
|
history
diff --git
a/src/string/strlcpy.c
b/src/string/strlcpy.c
index 6aeb106aa2e032c4d392631bb8fa9dd8a9f2e8bb..4d3ff92a8d79997c139b8a0eaaaefe54e5b7a2e6 100644
(file)
--- a/
src/string/strlcpy.c
+++ b/
src/string/strlcpy.c
@@
-16,7
+16,7
@@
size_t strlcpy(char *d, const char *s, size_t n)
const size_t *ws;
if (!n--) goto finish;
- if (((uintptr_t)s & ALIGN)
!
= ((uintptr_t)d & ALIGN)) {
+ if (((uintptr_t)s & ALIGN)
=
= ((uintptr_t)d & ALIGN)) {
for (; ((uintptr_t)s & ALIGN) && n && (*d=*s); n--, s++, d++);
if (n && *s) {
wd=(void *)d; ws=(const void *)s;