summaryrefslogtreecommitdiff
path: root/apps/playback.c
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2022-11-13 00:43:43 -0500
committerWilliam Wilgus <me.theuser@yahoo.com>2022-11-13 01:14:49 -0500
commita634557a881b59b8be1dc156f9822c6d20bd8741 (patch)
treefd953a0ea1d9a02a8d73a15f1aead27b59c5ffaa /apps/playback.c
parentffe2df2e92cbdeb507a49279a85ac88cac2fbe4f (diff)
downloadrockbox-a634557a881b59b8be1dc156f9822c6d20bd8741.tar.gz
rockbox-a634557a881b59b8be1dc156f9822c6d20bd8741.zip
fix strptokspn, add strcspn, fix splash.c
fix off by 1 error in strptokspn, add strcspn, fix fallout in splash.c Change-Id: I61475d9633fc35db5a8ae30cbe588f69f2f7fabc
Diffstat (limited to 'apps/playback.c')
-rw-r--r--apps/playback.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/apps/playback.c b/apps/playback.c
index c425e14baf..7eaa149f2c 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -1483,7 +1483,7 @@ static bool audio_init_codec(struct track_info *track_infop,
1483enum { AUTORESUMABLE_UNKNOWN = 0, AUTORESUMABLE_TRUE, AUTORESUMABLE_FALSE }; 1483enum { AUTORESUMABLE_UNKNOWN = 0, AUTORESUMABLE_TRUE, AUTORESUMABLE_FALSE };
1484static bool autoresumable(struct mp3entry *id3) 1484static bool autoresumable(struct mp3entry *id3)
1485{ 1485{
1486 char *endp, *path; 1486 char *path;
1487 size_t len; 1487 size_t len;
1488 bool is_resumable; 1488 bool is_resumable;
1489 1489
@@ -1501,13 +1501,7 @@ static bool autoresumable(struct mp3entry *id3)
1501 if (*path == ':') /* Skip empty search patterns */ 1501 if (*path == ':') /* Skip empty search patterns */
1502 continue; 1502 continue;
1503 1503
1504 /* FIXME: As soon as strcspn or strchrnul are made available in 1504 len = strcspn(path, ":");
1505 the core, the following can be made more efficient. */
1506 endp = strchr(path, ':');
1507 if (endp)
1508 len = endp - path;
1509 else
1510 len = strlen(path);
1511 1505
1512 /* Note: At this point, len is always > 0 */ 1506 /* Note: At this point, len is always > 0 */
1513 1507