X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Futils_ovs.c;h=4ca86aebe1d54df4e1e5f7ff5a47bbcac3b002d7;hb=a9191cc20f0a5af022ae1d9482af2eaf0098a46a;hp=57629a01a15f13771280d5a4873999783c6974b0;hpb=7b0628b4f4688d48d89f94ca381ca6340da05b37;p=collectd.git diff --git a/src/utils_ovs.c b/src/utils_ovs.c index 57629a01..4ca86aeb 100644 --- a/src/utils_ovs.c +++ b/src/utils_ovs.c @@ -191,7 +191,7 @@ struct ovs_db_s { }; /* Global variables */ -static uint64_t ovs_uid = 0; +static uint64_t ovs_uid; static pthread_mutex_t ovs_uid_mutex = PTHREAD_MUTEX_INITIALIZER; /* Post an event to event thread. @@ -1051,6 +1051,8 @@ ovs_db_t *ovs_db_init(const char *node, const char *service, ret = ovs_db_destroy(pdb); if (ret > 0) goto failure; + else + return NULL; } /* init polling thread */ @@ -1059,6 +1061,8 @@ ovs_db_t *ovs_db_init(const char *node, const char *service, if (ret > 0) { ovs_db_event_thread_data_destroy(pdb); goto failure; + } else { + return NULL; } } return pdb;