diff options
author | Sami Kerola | 2015-01-01 00:01:21 +0100 |
---|---|---|
committer | Karel Zak | 2015-01-07 10:08:21 +0100 |
commit | 7ee26cbf025d915c6c15e2fe877ee92846f5992f (patch) | |
tree | 532aa9b7a7f9807a0249830062ac26abd3d682b6 /sys-utils/swapon.c | |
parent | fallocate: create mode 0666, that's what umask is for (diff) | |
download | kernel-qcow2-util-linux-7ee26cbf025d915c6c15e2fe877ee92846f5992f.tar.gz kernel-qcow2-util-linux-7ee26cbf025d915c6c15e2fe877ee92846f5992f.tar.xz kernel-qcow2-util-linux-7ee26cbf025d915c6c15e2fe877ee92846f5992f.zip |
maint: fix shadow declaration
This change fixes all shadow declarations. The worth while to mention
fix is with libfdisk sun geometry. It comes from bitops.h cpu_to_be16
macro that further expands from include/bits/byteswap.h that has the
shadowing.
libfdisk/src/sun.c:961:173: warning: declaration of '__v' shadows a previous local [-Wshadow]
libfdisk/src/sun.c:961:69: warning: shadowed declaration is here [-Wshadow]
libfdisk/src/sun.c:961:178: warning: declaration of '__x' shadows a previous local [-Wshadow]
libfdisk/src/sun.c:961:74: warning: shadowed declaration is here [-Wshadow]
That could have caused earlier some unexpected results.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'sys-utils/swapon.c')
-rw-r--r-- | sys-utils/swapon.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys-utils/swapon.c b/sys-utils/swapon.c index 8a3a21739..c5106abcc 100644 --- a/sys-utils/swapon.c +++ b/sys-utils/swapon.c @@ -643,35 +643,35 @@ static int swapon_by_uuid(const char *uuid, int prio, int dsc) /* -o <options> or fstab */ static int parse_options(const char *optstr, - int *priority, int *discard, int *nofail) + int *prio, int *disc, int *nofail) { char *arg = NULL; assert(optstr); - assert(priority); - assert(discard); + assert(prio); + assert(disc); assert(nofail); if (mnt_optstr_get_option(optstr, "nofail", NULL, 0) == 0) *nofail = 1; if (mnt_optstr_get_option(optstr, "discard", &arg, NULL) == 0) { - *discard |= SWAP_FLAG_DISCARD; + *disc |= SWAP_FLAG_DISCARD; if (arg) { /* only single-time discards are wanted */ if (strcmp(arg, "once") == 0) - *discard |= SWAP_FLAG_DISCARD_ONCE; + *disc |= SWAP_FLAG_DISCARD_ONCE; /* do discard for every released swap page */ if (strcmp(arg, "pages") == 0) - *discard |= SWAP_FLAG_DISCARD_PAGES; + *disc |= SWAP_FLAG_DISCARD_PAGES; } } arg = NULL; if (mnt_optstr_get_option(optstr, "pri", &arg, NULL) == 0 && arg) - *priority = atoi(arg); + *prio = atoi(arg); return 0; } |