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/wdctl.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'sys-utils/wdctl.c') diff --git a/sys-utils/wdctl.c b/sys-utils/wdctl.c index 441b7abf9..e47fc70e9 100644 --- a/sys-utils/wdctl.c +++ b/sys-utils/wdctl.c @@ -212,7 +212,7 @@ static void add_flag_line(struct libscols_table *table, struct wdinfo *wd, const line = scols_table_new_line(table, NULL); if (!line) { - warn(_("failed to initialize output line")); + warn(_("failed to allocate output line")); return; } @@ -239,8 +239,10 @@ static void add_flag_line(struct libscols_table *table, struct wdinfo *wd, const break; } - if (str) - scols_line_set_data(line, i, str); + if (str && scols_line_set_data(line, i, str)) { + warn(_("failed to add output data")); + break; + } } } @@ -256,7 +258,7 @@ static int show_flags(struct wdinfo *wd, uint32_t wanted) /* create output table */ table = scols_new_table(); if (!table) { - warn(_("failed to initialize output table")); + warn(_("failed to allocate output table")); return -1; } scols_table_enable_raw(table, raw); @@ -267,7 +269,7 @@ static int show_flags(struct wdinfo *wd, uint32_t wanted) struct colinfo *col = get_column_info(i); if (!scols_table_new_column(table, col->name, col->whint, col->flags)) { - warnx(_("failed to initialize output column")); + warnx(_("failed to allocate output column")); goto done; } } -- cgit v1.2.3-55-g7522