From 14e01d6316479a1ee6225010f36d348c103a26c7 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Thu, 14 Nov 2019 17:59:32 +0100 Subject: [PATCH] hints: drop unneeded memset strncpy will zero buffer itself. --- lib/label/hints.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/label/hints.c b/lib/label/hints.c index ac2c0895b..45ab2ff6f 100644 --- a/lib/label/hints.c +++ b/lib/label/hints.c @@ -941,7 +941,6 @@ int write_hint_file(struct cmd_context *cmd, int newhints) * detect when the devices on the system change, which * invalidates the existing hints. */ - memset(devpath, 0, sizeof(devpath)); strncpy(devpath, dev_name(dev), PATH_MAX); hash = calc_crc(hash, (const uint8_t *)devpath, strlen(devpath)); count++; -- 2.43.5