Avoid a clang analyzer false positive.

This commit is contained in:
Todd C. Miller
2017-05-12 10:02:18 -06:00
parent 1dc39e9d99
commit 7db97c7835
2 changed files with 6 additions and 1 deletions

View File

@@ -1453,6 +1453,11 @@ sudo_netgroup_lookup_nested(LDAP *ld, char *base, struct timeval *timeout,
ldap_value_free_len(bv);
goto oom;
}
#ifdef __clang_analyzer__
/* clang analyzer false positive */
if (__builtin_expect(netgroups->stqh_last == NULL, 0))
__builtin_trap();
#endif
STAILQ_INSERT_TAIL(netgroups, ng, entries);
DPRINTF1("Found new netgroup %s for %s", ng->name, base);
}