Re: [PATCH 10/12] libsmartcols: remove ununsed assignment

Karel Zak
2014-04-28T09:02:21Z

On Sun, Apr 27, 2014 at 09:05:36PM +0100, Sami Kerola wrote:
> Value stored to 'rc' is never read.
>
> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
> ---
> libsmartcols/src/table_print.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libsmartcols/src/table_print.c b/libsmartcols/src/table_print.c
> index 2942053..4df587e 100644
> --- a/libsmartcols/src/table_print.c
> +++ b/libsmartcols/src/table_print.c
> @@ -739,7 +739,7 @@ int scols_print_table(struct libscols_table *tb)
> return -ENOMEM;
>
> if (!(scols_table_is_raw(tb) || scols_table_is_export(tb)))
> - rc = recount_widths(tb, buf);
> + recount_widths(tb, buf);

It would be better to check 'rc'.

if (rc)
goto done;

or so...

Karel

--
Karel Zak <kzak@redhat.com>