chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f8bf08
)
journald: be nice to coverity, add an extra assert
author
Lennart Poettering
<lennart@poettering.net>
Mon, 27 Oct 2014 22:50:51 +0000
(23:50 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Mon, 27 Oct 2014 22:50:53 +0000
(23:50 +0100)
coverity otherwise assumes that the chain object might be NULL.
src/journal/journal-file.c
patch
|
blob
|
history
diff --git
a/src/journal/journal-file.c
b/src/journal/journal-file.c
index d06dbc2f753397efd6408a0d451fd6ab914cc948..8a2c0fcac52d7efd3ec666e9b89aa2ae2fec81c4 100644
(file)
--- a/
src/journal/journal-file.c
+++ b/
src/journal/journal-file.c
@@
-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;