summaryrefslogtreecommitdiffstats
path: root/misc-utils
diff options
context:
space:
mode:
authorSami Kerola2019-05-18 23:39:58 +0200
committerSami Kerola2019-05-18 23:42:13 +0200
commit9abc8a42aa28dac93dba2734a532d71a7bef3521 (patch)
treebc6a351318bf5a9bad73ddd684d9266e7cab3184 /misc-utils
parentsulogin: fix variable / function shadowing [cppcheck] (diff)
downloadkernel-qcow2-util-linux-9abc8a42aa28dac93dba2734a532d71a7bef3521.tar.gz
kernel-qcow2-util-linux-9abc8a42aa28dac93dba2734a532d71a7bef3521.tar.xz
kernel-qcow2-util-linux-9abc8a42aa28dac93dba2734a532d71a7bef3521.zip
wipefs: fix variable / function shadowing [cppcheck]
[misc-utils/wipefs.c:636] -> [misc-utils/wipefs.c:310]: (style) Local variable usage shadows outer function Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'misc-utils')
-rw-r--r--misc-utils/wipefs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/misc-utils/wipefs.c b/misc-utils/wipefs.c
index 78e5ac376..be728279b 100644
--- a/misc-utils/wipefs.c
+++ b/misc-utils/wipefs.c
@@ -307,7 +307,7 @@ static struct wipe_desc *get_desc_for_probe(struct wipe_control *ctl,
loff_t *offset,
size_t *len)
{
- const char *off, *type, *mag, *p, *usage = NULL;
+ const char *off, *type, *mag, *p, *use = NULL;
struct wipe_desc *wp;
int rc, ispt = 0;
@@ -328,7 +328,7 @@ static struct wipe_desc *get_desc_for_probe(struct wipe_control *ctl,
rc = blkid_probe_lookup_value(pr, "PTMAGIC", &mag, len);
if (rc)
return NULL;
- usage = N_("partition-table");
+ use = N_("partition-table");
ispt = 1;
} else
return NULL;
@@ -357,8 +357,8 @@ static struct wipe_desc *get_desc_for_probe(struct wipe_control *ctl,
if (!wp)
return NULL;
- if (usage || blkid_probe_lookup_value(pr, "USAGE", &usage, NULL) == 0)
- wp->usage = xstrdup(usage);
+ if (use || blkid_probe_lookup_value(pr, "USAGE", &use, NULL) == 0)
+ wp->usage = xstrdup(use);
wp->type = xstrdup(type);
wp->on_disk = 1;