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 /sys-utils/dmesg.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 'sys-utils/dmesg.c')
-rw-r--r-- | sys-utils/dmesg.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c index 36c966f6a..454438842 100644 --- a/sys-utils/dmesg.c +++ b/sys-utils/dmesg.c @@ -1116,8 +1116,6 @@ static int parse_kmsg_record(struct dmesg_control *ctl, /* D) optional fields (ignore) */ p = skip_item(p, end, ";"); - if (LAST_KMSG_FIELD(p)) - goto mesg; mesg: /* E) message text */ @@ -1391,12 +1389,11 @@ int main(int argc, char *argv[]) if (argc > 1) usage(stderr); - if (is_timefmt(&ctl, RELTIME) || - is_timefmt(&ctl, CTIME) || - is_timefmt(&ctl, ISO8601)) { - if (dmesg_get_boot_time(&ctl.boot_time) != 0) - ctl.time_fmt = DMESG_TIMEFTM_NONE; - } + if ((is_timefmt(&ctl, RELTIME) || + is_timefmt(&ctl, CTIME) || + is_timefmt(&ctl, ISO8601)) + && dmesg_get_boot_time(&ctl.boot_time) != 0) + ctl.time_fmt = DMESG_TIMEFTM_NONE; if (delta) switch (ctl.time_fmt) { |