1
0
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:
Angel Pons
2021-06-07 13:29:13 +02:00
committed by Nico Huber
parent 3bd47524c0
commit f41d24823c
8 changed files with 21 additions and 49 deletions

View File

@ -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;