diff options
author | kay.sievers@vrfy.org <kay.sievers@vrfy.org> | 2005-03-29 03:53:45 +0200 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 23:55:00 -0700 |
commit | 12340f41085c5ab9f5f049eab640835e39de8286 (patch) | |
tree | db55f8dc668ccc60c0b407316222ad81ee949920 /udev_libc_wrapper.c | |
parent | bb1a77d34cd004b44b30a79d7521957c3881e497 (diff) |
[PATCH] klibc: version 1.0.5
Diffstat (limited to 'udev_libc_wrapper.c')
-rw-r--r-- | udev_libc_wrapper.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/udev_libc_wrapper.c b/udev_libc_wrapper.c index d69f2ac48e..1852141c93 100644 --- a/udev_libc_wrapper.c +++ b/udev_libc_wrapper.c @@ -58,8 +58,10 @@ size_t strlcpy(char *dst, const char *src, size_t size) bytes++; } + /* If size == 0 there is no space for a final null... */ if (size) *q = '\0'; + return bytes; } @@ -83,8 +85,7 @@ size_t strlcat(char *dst, const char *src, size_t size) bytes++; } - if (size) - *q = '\0'; + *q = '\0'; return bytes; } #endif /* __OWN_STRLCPYCAT__ */ |