From 57e1ab328c233c8c49ca1aa98632161da84f677b Mon Sep 17 00:00:00 2001 From: Nicolas Iooss Date: Sat, 26 May 2018 18:35:06 +0200 Subject: [PATCH] libsepol: cil: silence clang analyzer false positive In cil_tree_print_expr(), "rc < 0" is equivalent to "rc != 0" but clang's static analyzer does not know about this. Help it. Signed-off-by: Nicolas Iooss --- libsepol/cil/src/cil_tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsepol/cil/src/cil_tree.c b/libsepol/cil/src/cil_tree.c index 1b04fe68..b1cbda91 100644 --- a/libsepol/cil/src/cil_tree.c +++ b/libsepol/cil/src/cil_tree.c @@ -512,7 +512,7 @@ void cil_tree_print_expr(struct cil_list *datum_expr, struct cil_list *str_expr) } else { rc = cil_expr_to_string(str_expr, &expr_str); } - if (rc < 0) { + if (rc != SEPOL_OK) { cil_log(CIL_INFO, "ERROR)"); return; }