summaryrefslogtreecommitdiffstats
path: root/linux_mtd.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux_mtd.c')
-rw-r--r--linux_mtd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/linux_mtd.c b/linux_mtd.c
index a1af0696a..b06816411 100644
--- a/linux_mtd.c
+++ b/linux_mtd.c
@@ -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;