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>
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/55267
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
diff --git a/linux_mtd.c b/linux_mtd.c
index 316c8ed..998f37a 100644
--- a/linux_mtd.c
+++ b/linux_mtd.c
@@ -311,8 +311,7 @@
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;