chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[PATCH] klibc: version 1.0.6
[elogind.git]
/
klibc
/
klibc
/
strlcpy.c
diff --git
a/klibc/klibc/strlcpy.c
b/klibc/klibc/strlcpy.c
index 9e7b6bf91fa692779bcc7b7517bc4471c6695e49..e6937445cd64e5a0a8da91e8cbfeb3924604ad8a 100644
(file)
--- a/
klibc/klibc/strlcpy.c
+++ b/
klibc/klibc/strlcpy.c
@@
-19,8
+19,10
@@
size_t strlcpy(char *dst, const char *src, size_t size)
bytes++;
}
- if (size)
+ /* If size == 0 there is no space for a final null... */
+ if ( size )
*q = '\0';
+
return bytes;
}