summaryrefslogtreecommitdiffstats
path: root/sys-utils/zramctl.c
diff options
context:
space:
mode:
authorSami Kerola2015-08-17 19:44:28 +0200
committerKarel Zak2015-08-24 10:55:37 +0200
commit624e147ba29531b16edeaad21f67b7bc6e9e6b3e (patch)
tree124d36e8db6789af487c7dac5d8f7221ebade62a /sys-utils/zramctl.c
parentchfn: document CHFN_RESTRICT /etc/login.defs (diff)
downloadkernel-qcow2-util-linux-624e147ba29531b16edeaad21f67b7bc6e9e6b3e.tar.gz
kernel-qcow2-util-linux-624e147ba29531b16edeaad21f67b7bc6e9e6b3e.tar.xz
kernel-qcow2-util-linux-624e147ba29531b16edeaad21f67b7bc6e9e6b3e.zip
misc: fix shadow declarations
sys-utils/zramctl.c: In function 'get_mm_stat': sys-utils/zramctl.c:276:58: warning: declaration of 'inbytes' shadows a global declaration [-Wshadow] static char *get_mm_stat(struct zram *z, size_t idx, int inbytes) sys-utils/zramctl.c:119:39: note: shadowed declaration is here static unsigned int raw, no_headings, inbytes; libmount/src/tab.c: In function 'mnt_table_get_fs_root': libmount/src/tab.c:1221:22: warning: declaration of 'fs' shadows a parameter [-Wshadow] struct libmnt_fs *fs = mnt_table_find_mountpoint(tb, libmount/src/tab.c:1197:24: note: shadowed declaration is here struct libmnt_fs *fs, disk-utils/fsck.minix.c: In function 'main': disk-utils/fsck.minix.c:1364:17: warning: declaration of 'i' shadows a previous local [-Wshadow] unsigned long i, free; disk-utils/fsck.minix.c:1250:6: note: shadowed declaration is here int i; Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'sys-utils/zramctl.c')
-rw-r--r--sys-utils/zramctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys-utils/zramctl.c b/sys-utils/zramctl.c
index 957c1c048..99598236e 100644
--- a/sys-utils/zramctl.c
+++ b/sys-utils/zramctl.c
@@ -273,7 +273,7 @@ static struct zram *find_free_zram(void)
#include "path.h"
-static char *get_mm_stat(struct zram *z, size_t idx, int inbytes)
+static char *get_mm_stat(struct zram *z, size_t idx, int bytes)
{
struct sysfs_cxt *sysfs;
const char *name;
@@ -302,7 +302,7 @@ static char *get_mm_stat(struct zram *z, size_t idx, int inbytes)
}
if (z->mm_stat) {
- if (inbytes)
+ if (bytes)
return xstrdup(z->mm_stat[idx]);
num = strtou64_or_err(z->mm_stat[idx], _("Failed to parse mm_stat"));
@@ -311,7 +311,7 @@ static char *get_mm_stat(struct zram *z, size_t idx, int inbytes)
/* Linux < 4.1 uses /sys/block/zram<id>/<attrname> */
name = mm_stat_names[idx];
- if (inbytes)
+ if (bytes)
return sysfs_strdup(sysfs, name);
else if (sysfs_read_u64(sysfs, name, &num) == 0)
return size_to_human_string(SIZE_SUFFIX_1LETTER, num);