diff options
author | Karel Zak | 2017-05-18 11:39:34 +0200 |
---|---|---|
committer | Karel Zak | 2017-05-18 11:39:34 +0200 |
commit | 780ce22cdad01128139c1edfceb8f86338bf3dda (patch) | |
tree | bca21a46c58d6bf60ecaf59a4fa669c5a487d688 /login-utils/lslogins.c | |
parent | tests: Fix UDF test output after changing UUID algorithm (diff) | |
download | kernel-qcow2-util-linux-780ce22cdad01128139c1edfceb8f86338bf3dda.tar.gz kernel-qcow2-util-linux-780ce22cdad01128139c1edfceb8f86338bf3dda.tar.xz kernel-qcow2-util-linux-780ce22cdad01128139c1edfceb8f86338bf3dda.zip |
misc: consolidate smartcols error messages
... just to keep translators happy
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'login-utils/lslogins.c')
-rw-r--r-- | login-utils/lslogins.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/login-utils/lslogins.c b/login-utils/lslogins.c index f7acac9b9..ab04c10bb 100644 --- a/login-utils/lslogins.c +++ b/login-utils/lslogins.c @@ -915,7 +915,7 @@ static struct libscols_table *setup_table(struct lslogins_control *ctl) int n = 0; if (!table) - errx(EXIT_FAILURE, _("failed to initialize output table")); + err(EXIT_FAILURE, _("failed to allocate output table")); if (ctl->noheadings) scols_table_enable_noheadings(table, 1); @@ -972,6 +972,9 @@ static void fill_table(const void *u, const VISIT which, const int depth __attri return; ln = scols_table_new_line(tb, NULL); + if (!ln) + err(EXIT_FAILURE, _("failed to allocate output line")); + while (n < ncolumns) { int rc = 0; @@ -1067,8 +1070,8 @@ static void fill_table(const void *u, const VISIT which, const int depth __attri err(EXIT_FAILURE, _("internal error: unknown column")); } - if (rc != 0) - err(EXIT_FAILURE, _("failed to set data")); + if (rc) + err(EXIT_FAILURE, _("failed to add output data")); ++n; } return; |