X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Futils_ovs.c;h=4ca86aebe1d54df4e1e5f7ff5a47bbcac3b002d7;hp=57629a01a15f13771280d5a4873999783c6974b0;hb=7c9d772c992647fcba64a96800c146eb9f1647f8;hpb=61a4ed99b1a5b6d371bb745933d0efc5dff9505c 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;