summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSami Kerola2019-07-12 22:45:50 +0200
committerSami Kerola2019-07-12 22:45:50 +0200
commit34813bdd29cd2012bec61156286018ed9e13817a (patch)
tree805f7ade8e8b2168cff46633a63ffb0e989c5539
parentlib/ttyutils: avoid checking same thing twice (diff)
downloadkernel-qcow2-util-linux-34813bdd29cd2012bec61156286018ed9e13817a.tar.gz
kernel-qcow2-util-linux-34813bdd29cd2012bec61156286018ed9e13817a.tar.xz
kernel-qcow2-util-linux-34813bdd29cd2012bec61156286018ed9e13817a.zip
libfdisk: fix variable shadowing
libfdisk/src/context.c:678:7: warning: declaration of ‘rc’ shadows a previous local [-Wshadow] Signed-off-by: Sami Kerola <kerolasa@iki.fi>
-rw-r--r--libfdisk/src/context.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libfdisk/src/context.c b/libfdisk/src/context.c
index 3677648e9..770aa4d52 100644
--- a/libfdisk/src/context.c
+++ b/libfdisk/src/context.c
@@ -675,7 +675,7 @@ int fdisk_assign_device(struct fdisk_context *cxt,
fd = open(fname, (readonly ? O_RDONLY : O_RDWR ) | O_CLOEXEC);
if (fd < 0) {
- int rc = -errno;
+ rc = -errno;
DBG(CXT, ul_debugobj(cxt, "failed to assign device [rc=%d]", rc));
return rc;
}