diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/common/file_internal.c | 1 | ||||
-rw-r--r-- | firmware/common/strlcpy.c | 2 | ||||
-rw-r--r-- | firmware/common/zip.c | 3 | ||||
-rw-r--r-- | firmware/drivers/fat.c | 2 | ||||
-rw-r--r-- | firmware/libc/include/string.h | 3 |
5 files changed, 4 insertions, 7 deletions
diff --git a/firmware/common/file_internal.c b/firmware/common/file_internal.c index 9ddbb232b4..a73d9beaa2 100644 --- a/firmware/common/file_internal.c +++ b/firmware/common/file_internal.c | |||
@@ -227,6 +227,7 @@ void iso_decode_d_name(char *d_name) | |||
227 | return; | 227 | return; |
228 | 228 | ||
229 | char shortname[13]; | 229 | char shortname[13]; |
230 | /* this only gets called in the case of DOS (8.3) filenames */ | ||
230 | size_t len = strlcpy(shortname, d_name, sizeof (shortname)); | 231 | size_t len = strlcpy(shortname, d_name, sizeof (shortname)); |
231 | /* This MUST be the default codepage thus not something that could be | 232 | /* This MUST be the default codepage thus not something that could be |
232 | loaded on call */ | 233 | loaded on call */ |
diff --git a/firmware/common/strlcpy.c b/firmware/common/strlcpy.c index bfdb6482a4..5107ea1207 100644 --- a/firmware/common/strlcpy.c +++ b/firmware/common/strlcpy.c | |||
@@ -34,6 +34,6 @@ size_t strlcpy(char *dst, const char *src, size_t siz) | |||
34 | if (d) | 34 | if (d) |
35 | return (d - dst - 1); /* count does not include NUL */ | 35 | return (d - dst - 1); /* count does not include NUL */ |
36 | 36 | ||
37 | /* Not enough room in dst, add NUL and traverse rest of src */ | 37 | /* Not enough room in dst, traverse rest of src */ |
38 | return(siz + strlen(src+siz)); /* count does not include NUL */ | 38 | return(siz + strlen(src+siz)); /* count does not include NUL */ |
39 | } | 39 | } |
diff --git a/firmware/common/zip.c b/firmware/common/zip.c index 22c6226e3b..6d250abb58 100644 --- a/firmware/common/zip.c +++ b/firmware/common/zip.c | |||
@@ -20,8 +20,7 @@ | |||
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | 21 | ||
22 | #include "zip.h" | 22 | #include "zip.h" |
23 | #include <string.h> | 23 | #include "string-extra.h" |
24 | #include "strlcpy.h" | ||
25 | #include "file.h" | 24 | #include "file.h" |
26 | #include "dir.h" | 25 | #include "dir.h" |
27 | #include "system.h" | 26 | #include "system.h" |
diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c index 30d16f3666..20c8f2b8e0 100644 --- a/firmware/drivers/fat.c +++ b/firmware/drivers/fat.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include "config.h" | 22 | #include "config.h" |
23 | #include "system.h" | 23 | #include "system.h" |
24 | #include "sys/types.h" | 24 | #include "sys/types.h" |
25 | #include <string.h> | 25 | #include "string-extra.h" |
26 | #include <ctype.h> | 26 | #include <ctype.h> |
27 | #include <stdlib.h> | 27 | #include <stdlib.h> |
28 | #include <stdio.h> | 28 | #include <stdio.h> |
diff --git a/firmware/libc/include/string.h b/firmware/libc/include/string.h index 4ec2f8dd67..6217fff15c 100644 --- a/firmware/libc/include/string.h +++ b/firmware/libc/include/string.h | |||
@@ -40,9 +40,6 @@ size_t _EXFUN(strspn,(const char *, const char *)); | |||
40 | char *_EXFUN(strstr,(const char *, const char *)); | 40 | char *_EXFUN(strstr,(const char *, const char *)); |
41 | char *_EXFUN(strcasestr,(const char *, const char *)); | 41 | char *_EXFUN(strcasestr,(const char *, const char *)); |
42 | 42 | ||
43 | size_t strlcpy(char *dst, const char *src, size_t siz); | ||
44 | size_t strlcat(char *dst, const char *src, size_t siz); | ||
45 | |||
46 | #ifndef _REENT_ONLY | 43 | #ifndef _REENT_ONLY |
47 | char *_EXFUN(strtok,(char *, const char *)); | 44 | char *_EXFUN(strtok,(char *, const char *)); |
48 | #endif | 45 | #endif |