From: Zdenek Kabelac Date: Thu, 14 Nov 2019 16:59:32 +0000 (+0100) Subject: hints: drop unneeded memset X-Git-Tag: v2_03_07~35 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=14e01d6316479a1ee6225010f36d348c103a26c7;p=lvm2.git hints: drop unneeded memset strncpy will zero buffer itself. --- 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++;