From 8ed668bd420adb8d090e49d5cbe64ab26e22e679 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Mon, 18 Jul 2016 12:33:55 +0300 Subject: [PATCH] slist: Silence a smatch warning Smatch complains that we previously assumed that one_iter.sm could be NULL. The truth that if either one is NULL then the other is NULL so I could just remove the second half of the check. But I guess I want it in for documentation to show that both are NULL when we exit, otherwise it looks unbalanced. Signed-off-by: Dan Carpenter --- smatch_slist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smatch_slist.c b/smatch_slist.c index a25e40b2..a17d2118 100644 --- a/smatch_slist.c +++ b/smatch_slist.c @@ -737,7 +737,7 @@ static void __merge_stree(struct stree **to, struct stree *stree, int add_pool) avl_iter_begin(&two_iter, implied_two, FORWARD); for (;;) { - if (!one_iter.sm && !two_iter.sm) + if (!one_iter.sm || !two_iter.sm) break; if (cmp_tracker(one_iter.sm, two_iter.sm) < 0) { sm_msg("error: Internal smatch error."); -- 2.11.4.GIT