mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-02 06:23:18 +02:00
treewide: Drop unnecessary uses of memset/memcpy
Simply provide an initialiser or use a direct assignment instead. Change-Id: I07385375cd8eec8a95874001b402b2c17ec09e09 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/55267 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
@ -315,8 +315,7 @@ static int linux_mtd_setup(int dev_num, struct linux_mtd_data *data)
|
||||
if (snprintf(sysfs_path, sizeof(sysfs_path), "%s/mtd%d/", LINUX_MTD_SYSFS_ROOT, dev_num) < 0)
|
||||
goto linux_mtd_setup_exit;
|
||||
|
||||
char buf[4];
|
||||
memset(buf, 0, sizeof(buf));
|
||||
char buf[4] = { 0 };
|
||||
if (read_sysfs_string(sysfs_path, "type", buf, sizeof(buf)))
|
||||
return 1;
|
||||
|
||||
|
Reference in New Issue
Block a user