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 <nicolas.iooss@m4x.org>
This commit is contained in:
Nicolas Iooss 2018-05-26 18:35:06 +02:00
parent a9f8a101fd
commit 57e1ab328c
No known key found for this signature in database
GPG Key ID: C191415F340DAAA0

View File

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