summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 88ad924)
raw | patch | inline | side by side (parent: 88ad924)
author | Florian Forster <octo@collectd.org> | |
Tue, 16 Aug 2016 04:57:24 +0000 (06:57 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Tue, 16 Aug 2016 04:57:24 +0000 (06:57 +0200) |
clang scan-build flags this, because this variable is used to declare VLAs.
src/ceph.c | patch | blob | history |
diff --git a/src/ceph.c b/src/ceph.c
index 5b7923915db798d1c62419c124addf136eecb56a..458112ae0eb91c4018e9139c8f104f83ed14e6b4 100644 (file)
--- a/src/ceph.c
+++ b/src/ceph.c
/******* lifecycle *******/
static int ceph_init(void)
{
- int ret;
-
#if defined(HAVE_SYS_CAPABILITY_H) && defined(CAP_DAC_OVERRIDE)
if (check_capability (CAP_DAC_OVERRIDE) != 0)
{
ceph_daemons_print();
- ret = cconn_main_loop(ASOK_REQ_VERSION);
+ if (g_num_daemons < 1)
+ {
+ ERROR ("ceph plugin: No daemons configured. See the \"Daemon\" config option.");
+ return ENOENT;
+ }
- return (ret) ? ret : 0;
+ return cconn_main_loop(ASOK_REQ_VERSION);
}
static int ceph_shutdown(void)