X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fconnectivity.c;h=f9edece16acf6ce63aa6629630185b5920815b0a;hb=b1fcd74a4e66d19746a302f54cc6b65296da3fd0;hp=c470c9957c792fcdb7751712ff640f4597d455a9;hpb=5fc6a7eb4851b1838665a77d25151a0f17396e44;p=collectd.git diff --git a/src/connectivity.c b/src/connectivity.c index c470c995..f9edece1 100644 --- a/src/connectivity.c +++ b/src/connectivity.c @@ -558,8 +558,7 @@ static int read_event(int nl, int (*msg_handler)(struct nlmsghdr *)) { continue; } - if (errno == EINTR) - { + if (errno == EINTR) { // Interrupt, so just return return 0; } @@ -614,13 +613,9 @@ static void send_interface_status() { for (interface_list_t *il = interface_list_head; il != NULL; il = il->next) /* {{{ */ { - uint32_t status; - uint32_t prev_status; - uint32_t sent; - - status = il->status; - prev_status = il->prev_status; - sent = il->sent; + uint32_t status = il->status; + uint32_t prev_status = il->prev_status; + uint32_t sent = il->sent; if (status != prev_status && sent == 0) { connectivity_dispatch_notification(il->interface, "gauge", status, @@ -945,6 +940,9 @@ static int connectivity_config(const char *key, const char *value) /* {{{ */ { if (ignorelist == NULL) { ignorelist = ignorelist_create(/* invert = */ 1); + + if (ignorelist == NULL) + return -1; } if (strcasecmp(key, "Interface") == 0) {