From 7c643fa8b9d103ad27c0996c788ba3c910a5b2a4 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 5 Sep 2014 07:16:20 +0200 Subject: [PATCH] write_http plugin: Don't compare pointer with numeric literal. Not even zero. Not even once. References: #722 --- src/write_http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/write_http.c b/src/write_http.c index 198fb48d..7a1fbd04 100644 --- a/src/write_http.c +++ b/src/write_http.c @@ -590,7 +590,7 @@ static int wh_config_url (oconfig_item_t *ci) /* {{{ */ /* Allocate the buffer. */ cb->send_buffer = malloc (cb->send_buffer_size); - if (cb->send_buffer == 0) + if (cb->send_buffer == NULL) { ERROR ("write_http plugin: malloc(%zu) failed.", cb->send_buffer_size); wh_callback_free (cb); -- 2.11.0