summaryrefslogtreecommitdiffstats
path: root/login-utils/lslogins.c
diff options
context:
space:
mode:
authorSami Kerola2015-01-01 00:01:21 +0100
committerKarel Zak2015-01-07 10:08:21 +0100
commit7ee26cbf025d915c6c15e2fe877ee92846f5992f (patch)
tree532aa9b7a7f9807a0249830062ac26abd3d682b6 /login-utils/lslogins.c
parentfallocate: create mode 0666, that's what umask is for (diff)
downloadkernel-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 'login-utils/lslogins.c')
-rw-r--r--login-utils/lslogins.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/login-utils/lslogins.c b/login-utils/lslogins.c
index ef7096aec..48ba6d8ad 100644
--- a/login-utils/lslogins.c
+++ b/login-utils/lslogins.c
@@ -892,33 +892,33 @@ static int create_usertree(struct lslogins_control *ctl)
static struct libscols_table *setup_table(struct lslogins_control *ctl)
{
- struct libscols_table *tb = scols_new_table();
+ struct libscols_table *table = scols_new_table();
int n = 0;
- if (!tb)
+ if (!table)
errx(EXIT_FAILURE, _("failed to initialize output table"));
if (ctl->noheadings)
- scols_table_enable_noheadings(tb, 1);
+ scols_table_enable_noheadings(table, 1);
switch(outmode) {
case OUT_COLON:
- scols_table_enable_raw(tb, 1);
- scols_table_set_column_separator(tb, ":");
+ scols_table_enable_raw(table, 1);
+ scols_table_set_column_separator(table, ":");
break;
case OUT_NEWLINE:
- scols_table_set_column_separator(tb, "\n");
+ scols_table_set_column_separator(table, "\n");
/* fallthrough */
case OUT_EXPORT:
- scols_table_enable_export(tb, 1);
+ scols_table_enable_export(table, 1);
break;
case OUT_NUL:
- scols_table_set_line_separator(tb, "\0");
+ scols_table_set_line_separator(table, "\0");
/* fallthrough */
case OUT_RAW:
- scols_table_enable_raw(tb, 1);
+ scols_table_enable_raw(table, 1);
break;
case OUT_PRETTY:
- scols_table_enable_noheadings(tb, 1);
+ scols_table_enable_noheadings(table, 1);
default:
break;
}
@@ -929,7 +929,7 @@ static struct libscols_table *setup_table(struct lslogins_control *ctl)
if (ctl->notrunc)
flags &= ~SCOLS_FL_TRUNC;
- if (!scols_table_new_column(tb,
+ if (!scols_table_new_column(table,
coldescs[columns[n]].name,
coldescs[columns[n]].whint,
flags))
@@ -937,9 +937,9 @@ static struct libscols_table *setup_table(struct lslogins_control *ctl)
++n;
}
- return tb;
+ return table;
fail:
- scols_unref_table(tb);
+ scols_unref_table(table);
return NULL;
}
@@ -1106,7 +1106,7 @@ done:
}
#endif
-static int print_pretty(struct libscols_table *tb)
+static int print_pretty(struct libscols_table *table)
{
struct libscols_iter *itr = scols_new_iter(SCOLS_ITER_FORWARD);
struct libscols_column *col;
@@ -1115,8 +1115,8 @@ static int print_pretty(struct libscols_table *tb)
const char *hstr, *dstr;
int n = 0;
- ln = scols_table_get_line(tb, 0);
- while (!scols_table_next_column(tb, itr, &col)) {
+ ln = scols_table_get_line(table, 0);
+ while (!scols_table_next_column(table, itr, &col)) {
data = scols_line_get_cell(ln, n);