summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f674a62)
raw | patch | inline | side by side (parent: f674a62)
author | Florian Forster <octo@collectd.org> | |
Tue, 16 Aug 2016 05:09:45 +0000 (07:09 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Tue, 16 Aug 2016 05:09:45 +0000 (07:09 +0200) |
The static analyzer is whining about passing NULLs to strcmp().
src/ceph.c | patch | blob | history |
diff --git a/src/ceph.c b/src/ceph.c
index 458112ae0eb91c4018e9139c8f104f83ed14e6b4..e6d3767b3140d786698f054796b23b4ed903b78f 100644 (file)
--- a/src/ceph.c
+++ b/src/ceph.c
{
latency_type = 1;
+ /* depth >= 2 => (stack[-1] != NULL && stack[-2] != NULL) */
+ assert ((state->depth < 2)
+ || ((state->stack[state->depth - 1] != NULL)
+ && (state->stack[state->depth - 2] != NULL)));
+
/* Super-special case for filestore.journal_wr_bytes.avgcount: For
* some reason, Ceph schema encodes this as a count/sum pair while all
* other "Bytes" data (excluding used/capacity bytes for OSD space) uses