mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Use STRLEN_CONST where possible
This commit is contained in:
parent
67898f5d12
commit
8fccac666e
@ -1371,7 +1371,8 @@ struct string_list* cdrom_get_available_drives(void)
|
||||
if (!is_cdrom)
|
||||
continue;
|
||||
|
||||
sscanf(dir_list->elems[i].data + strlen("/dev/sg"), "%d", &dev_index);
|
||||
sscanf(dir_list->elems[i].data + STRLEN_CONST("/dev/sg"),
|
||||
"%d", &dev_index);
|
||||
|
||||
dev_index = '0' + dev_index;
|
||||
attr.i = dev_index;
|
||||
|
@ -129,7 +129,7 @@ static bool m3u_file_load(m3u_file_t *m3u_file)
|
||||
continue;
|
||||
|
||||
/* Determine line 'type' */
|
||||
m3u_size = strlen(M3U_FILE_NONSTD_LABEL);
|
||||
m3u_size = STRLEN_CONST(M3U_FILE_NONSTD_LABEL);
|
||||
|
||||
/* > '#LABEL:' */
|
||||
if (!strncmp(
|
||||
@ -151,12 +151,12 @@ static bool m3u_file_load(m3u_file_t *m3u_file)
|
||||
/* > '#EXTINF:' */
|
||||
else if (!strncmp(
|
||||
line, M3U_FILE_EXTSTD_LABEL,
|
||||
strlen(M3U_FILE_EXTSTD_LABEL)))
|
||||
STRLEN_CONST(M3U_FILE_EXTSTD_LABEL)))
|
||||
{
|
||||
/* Label is the string to the right
|
||||
* of the first comma */
|
||||
const char* label_ptr = strchr(
|
||||
line + strlen(M3U_FILE_EXTSTD_LABEL),
|
||||
line + STRLEN_CONST(M3U_FILE_EXTSTD_LABEL),
|
||||
M3U_FILE_EXTSTD_LABEL_TOKEN);
|
||||
|
||||
if (!string_is_empty(label_ptr))
|
||||
|
Loading…
x
Reference in New Issue
Block a user