From: Ruben Kerkhof Date: Sat, 23 Apr 2016 09:39:47 +0000 (+0200) Subject: memcachec plugin: prev can't be NULL here X-Git-Tag: collectd-5.6.0~329^2~17 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=428613f0d607a75fa9271dee2c79baba98b02b98;p=collectd.git memcachec plugin: prev can't be NULL here [src/memcachec.c:392] -> [src/memcachec.c:390]: (warning) Either the condition 'prev!=0' is redundant or there is possible null pointer dereference: prev. --- diff --git a/src/memcachec.c b/src/memcachec.c index 1e1d42dc..629b99ba 100644 --- a/src/memcachec.c +++ b/src/memcachec.c @@ -387,7 +387,7 @@ static int cmc_config_add_page (oconfig_item_t *ci) /* {{{ */ web_page_t *prev; prev = pages_g; - while ((prev != NULL) && (prev->next != NULL)) + while (prev->next != NULL) prev = prev->next; prev->next = page; }