summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2019-11-14 17:59:32 +0100
committerZdenek Kabelac <zkabelac@redhat.com>2019-11-14 18:06:42 +0100
commit14e01d6316479a1ee6225010f36d348c103a26c7 (patch)
tree223dd11da2f6d4a75d6b2ecf935719e6a1321a8f
parent1760b96368ae41e76e89a7064254f995713a41e5 (diff)
downloadlvm2-14e01d6316479a1ee6225010f36d348c103a26c7.tar.gz
hints: drop unneeded memset
strncpy will zero buffer itself.
-rw-r--r--lib/label/hints.c1
1 files changed, 0 insertions, 1 deletions
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++;