diff options
author | Sami Kerola | 2016-07-04 23:09:10 +0200 |
---|---|---|
committer | Sami Kerola | 2016-07-21 22:14:33 +0200 |
commit | 74ce680a3ef90503b26da0a34f04cf725f6c5beb (patch) | |
tree | 307baa695e1c36c7a7855718468d9913ddf96bc1 /misc-utils/mcookie.c | |
parent | agetty: call uname() only when necessary (diff) | |
download | kernel-qcow2-util-linux-74ce680a3ef90503b26da0a34f04cf725f6c5beb.tar.gz kernel-qcow2-util-linux-74ce680a3ef90503b26da0a34f04cf725f6c5beb.tar.xz kernel-qcow2-util-linux-74ce680a3ef90503b26da0a34f04cf725f6c5beb.zip |
misc: simplify if clauses [oclint]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'misc-utils/mcookie.c')
-rw-r--r-- | misc-utils/mcookie.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/misc-utils/mcookie.c b/misc-utils/mcookie.c index f26d4d257..ffeb36abe 100644 --- a/misc-utils/mcookie.c +++ b/misc-utils/mcookie.c @@ -121,10 +121,8 @@ static void randomness_from_files(struct mcookie_control *ctl) "Got %zu bytes from %s\n", count), count, fname); - if (fd != STDIN_FILENO) - if (close(fd)) - err(EXIT_FAILURE, - _("closing %s failed"), fname); + if (fd != STDIN_FILENO && close(fd)) + err(EXIT_FAILURE, _("closing %s failed"), fname); } } } |