nuttx: use sizeof instead of define or number in snprintf

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
Petro Karashchenko
2024-08-24 12:54:12 -04:00
committed by Xiang Xiao
parent dd7ecd9aef
commit d252b6229f
83 changed files with 114 additions and 110 deletions
@@ -161,7 +161,7 @@ Sample Code to Mount the ROMFS Filesystem
/* Use the minor number to create a name for the ROM disk block device */
snprintf(devname, 32, "/dev/ram%d", minor);
snprintf(devname, sizeof(devname), "/dev/ram%d", minor);
/* Mount the ROMFS file system */