]> sourceware.org Git - lvm2.git/commitdiff
hints: drop unneeded memset
authorZdenek Kabelac <zkabelac@redhat.com>
Thu, 14 Nov 2019 16:59:32 +0000 (17:59 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Thu, 14 Nov 2019 17:06:42 +0000 (18:06 +0100)
strncpy will zero buffer itself.

lib/label/hints.c

index ac2c0895b302757ce89acfdfc271107cde3e4cfc..45ab2ff6ff75f33e6dacbc5f5ba5e9d3e69ce64a 100644 (file)
@@ -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++;
This page took 0.038319 seconds and 5 git commands to generate.