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>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/71372
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/ichspi.c b/ichspi.c
index 90bbd13..d59fd3b 100644
--- a/ichspi.c
+++ b/ichspi.c
@@ -1723,7 +1723,7 @@
char *arg;
int ich_spi_rw_restricted = 0;
int desc_valid = 0;
- struct ich_descriptors desc;
+ struct ich_descriptors desc = { 0 };
enum ich_spi_mode {
ich_auto,
ich_hwseq,
@@ -1734,8 +1734,6 @@
ich_generation = ich_gen;
ich_spibar = spibar;
- memset(&desc, 0x00, sizeof(desc));
-
/* Moving registers / bits */
switch (ich_generation) {
case CHIPSET_100_SERIES_SUNRISE_POINT: