Replace strlen with sizeof for kconfig string
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
3b4ea52a79
commit
7f3a76c290
@ -616,7 +616,7 @@ int rp2040_common_bringup(void)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: smart_initialize failed: %d\n", -ret);
|
||||
}
|
||||
else if (strlen(CONFIG_RP2040_FLASH_MOUNT_POINT) > 0)
|
||||
else if (sizeof(CONFIG_RP2040_FLASH_MOUNT_POINT) > 1)
|
||||
{
|
||||
mkdir(CONFIG_RP2040_FLASH_MOUNT_POINT, 0777);
|
||||
|
||||
|
@ -68,9 +68,9 @@ static void local_format_name(FAR const char *inpath, FAR char *outpath,
|
||||
FAR const char *suffix, int32_t id)
|
||||
{
|
||||
if (strncmp(inpath, CONFIG_NET_LOCAL_VFS_PATH,
|
||||
strlen(CONFIG_NET_LOCAL_VFS_PATH)) == 0)
|
||||
sizeof(CONFIG_NET_LOCAL_VFS_PATH) - 1) == 0)
|
||||
{
|
||||
inpath += strlen(CONFIG_NET_LOCAL_VFS_PATH);
|
||||
inpath += sizeof(CONFIG_NET_LOCAL_VFS_PATH) - 1;
|
||||
}
|
||||
|
||||
if (id < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user