From 74ce680a3ef90503b26da0a34f04cf725f6c5beb Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Mon, 4 Jul 2016 22:09:10 +0100 Subject: misc: simplify if clauses [oclint] Signed-off-by: Sami Kerola --- sys-utils/dmesg.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'sys-utils/dmesg.c') 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) { -- cgit v1.2.3-55-g7522