diff options
Diffstat (limited to 'libbb/safe_strncpy.c')
-rw-r--r-- | libbb/safe_strncpy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/safe_strncpy.c b/libbb/safe_strncpy.c index ebc7e28f3..cc425839f 100644 --- a/libbb/safe_strncpy.c +++ b/libbb/safe_strncpy.c | |||
@@ -10,7 +10,7 @@ | |||
10 | #include "libbb.h" | 10 | #include "libbb.h" |
11 | 11 | ||
12 | /* Like strncpy but make sure the resulting string is always 0 terminated. */ | 12 | /* Like strncpy but make sure the resulting string is always 0 terminated. */ |
13 | char * safe_strncpy(char *dst, const char *src, size_t size) | 13 | char *safe_strncpy(char *dst, const char *src, size_t size) |
14 | { | 14 | { |
15 | if (!size) return dst; | 15 | if (!size) return dst; |
16 | dst[--size] = '\0'; | 16 | dst[--size] = '\0'; |