From 780ce22cdad01128139c1edfceb8f86338bf3dda Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 18 May 2017 11:39:34 +0200 Subject: misc: consolidate smartcols error messages ... just to keep translators happy Signed-off-by: Karel Zak --- sys-utils/prlimit.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'sys-utils/prlimit.c') diff --git a/sys-utils/prlimit.c b/sys-utils/prlimit.c index c96d38589..a62d457fe 100644 --- a/sys-utils/prlimit.c +++ b/sys-utils/prlimit.c @@ -226,7 +226,7 @@ static void add_scols_line(struct libscols_table *table, struct prlimit *l) line = scols_table_new_line(table, NULL); if (!line) - err(EXIT_FAILURE, _("failed to initialize output line")); + err(EXIT_FAILURE, _("failed to allocate output line")); for (i = 0; i < ncolumns; i++) { char *str = NULL; @@ -257,8 +257,8 @@ static void add_scols_line(struct libscols_table *table, struct prlimit *l) break; } - if (str) - scols_line_refer_data(line, i, str); + if (str && scols_line_refer_data(line, i, str)) + err(EXIT_FAILURE, _("failed to add output data")); } } @@ -294,7 +294,7 @@ static int show_limits(struct list_head *lims) table = scols_new_table(); if (!table) - err(EXIT_FAILURE, _("failed to initialize output table")); + err(EXIT_FAILURE, _("failed to allocate output table")); scols_table_enable_raw(table, raw); scols_table_enable_noheadings(table, no_headings); @@ -303,10 +303,9 @@ static int show_limits(struct list_head *lims) struct colinfo *col = get_column_info(i); if (!scols_table_new_column(table, col->name, col->whint, col->flags)) - err(EXIT_FAILURE, _("failed to initialize output column")); + err(EXIT_FAILURE, _("failed to allocate output column")); } - list_for_each_safe(p, pnext, lims) { struct prlimit *lim = list_entry(p, struct prlimit, lims); -- cgit v1.2.3-55-g7522