bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] ls: don't use an undefined struct stat after failed stat/lst


From: Paul Eggert
Subject: Re: [PATCH] ls: don't use an undefined struct stat after failed stat/lstat
Date: Tue, 06 Oct 2009 09:22:00 -0700
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Pádraig Brady <address@hidden> writes:

> -            human_readable (ST_NBLOCKS (f->stat), buf, human_output_opts,
> -                            ST_NBLOCKSIZE, output_block_size));
> +            ! f->stat_ok ? "?"
> +            : human_readable (ST_NBLOCKS (f->stat), buf, human_output_opts,
> +                              ST_NBLOCKSIZE, output_block_size));

Just as a style thing, it's better to parenthesize expressions that
cross line boundaries, e.g.:

            (! f->stat_ok ? "?"
             : human_readable (ST_NBLOCKS (f->stat), buf, human_output_opts,
                              ST_NBLOCKSIZE, output_block_size))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]