journald: be nice to coverity, add an extra assert

coverity otherwise assumes that the chain object might be NULL.
This commit is contained in:
Lennart Poettering
2014-10-27 23:50:53 +01:00
parent 7f8bf08f90
commit 294330896d
+3 -2
View File
@@ -1380,9 +1380,10 @@ static void chain_cache_put(
if (array == first)
return;
if (ordered_hashmap_size(h) >= CHAIN_CACHE_MAX)
if (ordered_hashmap_size(h) >= CHAIN_CACHE_MAX) {
ci = ordered_hashmap_steal_first(h);
else {
assert(ci);
} else {
ci = new(ChainCacheItem, 1);
if (!ci)
return;