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>
This commit is contained in:
Thomas Haller 2014-06-10 16:15:02 +02:00
parent 29a38942aa
commit d50758cbfe
2 changed files with 2 additions and 5 deletions

View file

@ -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;

View file

@ -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: