From f41d24823c1703e328fc27588bbcf3c96eecdbc9 Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Mon, 7 Jun 2021 13:29:13 +0200 Subject: 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 Reviewed-on: https://review.coreboot.org/c/flashrom/+/55267 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber --- jlink_spi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'jlink_spi.c') diff --git a/jlink_spi.c b/jlink_spi.c index 6342e7fc..0b862cf1 100644 --- a/jlink_spi.c +++ b/jlink_spi.c @@ -358,9 +358,8 @@ int jlink_spi_init(void) goto init_err; } - uint8_t caps[JAYLINK_DEV_EXT_CAPS_SIZE]; + uint8_t caps[JAYLINK_DEV_EXT_CAPS_SIZE] = { 0 }; - memset(caps, 0, sizeof(caps)); ret = jaylink_get_caps(jaylink_devh, caps); if (ret != JAYLINK_OK) { -- cgit v1.2.3