mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 11:56:10 +08:00
nuttx: use sizeof instead of define or number in snprintf
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
committed by
Xiang Xiao
parent
dd7ecd9aef
commit
d252b6229f
@@ -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 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user