diff options
author | Thomas Haller <thaller@redhat.com> | 2014-06-10 14:15:02 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-06-10 19:45:52 (GMT) |
commit | d50758cbfe7741650bc470f349ead29f824dd182 (patch) | |
tree | ca613c2b50e580f4f14f981025b781cd46f0e38c | |
parent | 29a38942aaae5a9a1145a92babfb2ad32dddb187 (diff) | |
download | libnl-d50758cbfe7741650bc470f349ead29f824dd182.zip libnl-d50758cbfe7741650bc470f349ead29f824dd182.tar.gz libnl-d50758cbfe7741650bc470f349ead29f824dd182.tar.bz2 |
route: remove unnecessary non-null check in pktloc and ematch
This check is not necessary, and also they cause coverity to
complain.
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
-rw-r--r-- | lib/route/cls/ematch.c | 4 | ||||
-rw-r--r-- | lib/route/pktloc.c | 3 |
2 files changed, 2 insertions, 5 deletions
diff --git a/lib/route/cls/ematch.c b/lib/route/cls/ematch.c index 779bf8b..ab30324 100644 --- a/lib/route/cls/ematch.c +++ b/lib/route/cls/ematch.c @@ -654,9 +654,7 @@ int rtnl_ematch_parse_expr(const char *expr, char **errp, goto errout; } - if (scanner) - ematch_lex_destroy(scanner); - + ematch_lex_destroy(scanner); *result = tree; return 0; diff --git a/lib/route/pktloc.c b/lib/route/pktloc.c index 9fcf4a4..5bb841c 100644 --- a/lib/route/pktloc.c +++ b/lib/route/pktloc.c @@ -138,8 +138,7 @@ static int read_pktlocs(void) last_read = st.st_mtime; errout_scanner: - if (scanner) - pktloc_lex_destroy(scanner); + pktloc_lex_destroy(scanner); errout_close: fclose(fd); errout: |