summaryrefslogtreecommitdiffstats
path: root/plugins/check_curl.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_curl.c')
-rw-r--r--plugins/check_curl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c
index 512fb88..cc17ef5 100644
--- a/plugins/check_curl.c
+++ b/plugins/check_curl.c
@@ -422,8 +422,8 @@ lookup_host (const char *host, char *buf, size_t buflen)
422 // Append all IPs to buf as a comma-separated string 422 // Append all IPs to buf as a comma-separated string
423 addrstr_len = strlen(addrstr); 423 addrstr_len = strlen(addrstr);
424 if (buflen_remaining > addrstr_len + 1) { 424 if (buflen_remaining > addrstr_len + 1) {
425 if (buf[0] != NULL) { 425 if (buf[0] != '\0') {
426 strncat(buf, ",", 1); 426 strncat(buf, ",", buflen_remaining);
427 buflen_remaining -= 1; 427 buflen_remaining -= 1;
428 } 428 }
429 strncat(buf, addrstr, buflen_remaining); 429 strncat(buf, addrstr, buflen_remaining);