summaryrefslogtreecommitdiff
path: root/firmware/common
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2022-11-15 11:24:34 -0500
committerWilliam Wilgus <wilgus.william@gmail.com>2022-11-17 01:54:46 -0500
commit972810f6cfd9715de1b182978c4d26e67dcf72cf (patch)
tree71b62ce1bb22cfb5ea8974667b0b74bb1697fe9e /firmware/common
parent0b7a387671a56a1b526b3672cd695b5764597f3e (diff)
downloadrockbox-972810f6cfd9715de1b182978c4d26e67dcf72cf.tar.gz
rockbox-972810f6cfd9715de1b182978c4d26e67dcf72cf.zip
strlcpy finish cleanup
remove strlcpy & strlcat from string.h document suspicious strlcpy call convert strlcat.h users to string-extra Change-Id: I313e75db86385c0e6d1aee75d252093be4935f60
Diffstat (limited to 'firmware/common')
-rw-r--r--firmware/common/file_internal.c1
-rw-r--r--firmware/common/strlcpy.c2
-rw-r--r--firmware/common/zip.c3
3 files changed, 3 insertions, 3 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"