From: Ruben Kerkhof Date: Sat, 23 Apr 2016 10:08:13 +0000 (+0200) Subject: curl plugin: prev can't be NULL here X-Git-Tag: collectd-5.6.0~329^2~5 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8a455c585f048f4ced69a3be9d5cdee6c091dbf2;p=collectd.git curl plugin: prev can't be NULL here [src/curl.c:548] -> [src/curl.c:546]: (warning) Either the condition 'prev!=0' is redundant or there is possible null pointer dereference: prev. --- diff --git a/src/curl.c b/src/curl.c index 2ed09225..310561c9 100644 --- a/src/curl.c +++ b/src/curl.c @@ -543,7 +543,7 @@ static int cc_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; }