diff options
| -rw-r--r-- | lib/output.c | 2 | ||||
| -rw-r--r-- | plugins/check_ntp_time.c | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/lib/output.c b/lib/output.c index f283969f..62e1366d 100644 --- a/lib/output.c +++ b/lib/output.c | |||
| @@ -42,7 +42,7 @@ static inline char *fmt_subcheck_perfdata(mp_subcheck check) { | |||
| 42 | 42 | ||
| 43 | while (subchecks != NULL) { | 43 | while (subchecks != NULL) { |
| 44 | if (added > 0) { | 44 | if (added > 0) { |
| 45 | added = asprintf(&result, "%s%s", result, fmt_subcheck_perfdata(subchecks->subcheck)); | 45 | added = asprintf(&result, "%s %s", result, fmt_subcheck_perfdata(subchecks->subcheck)); |
| 46 | } else { | 46 | } else { |
| 47 | // TODO free previous result here? | 47 | // TODO free previous result here? |
| 48 | added = asprintf(&result, "%s", fmt_subcheck_perfdata(subchecks->subcheck)); | 48 | added = asprintf(&result, "%s", fmt_subcheck_perfdata(subchecks->subcheck)); |
diff --git a/plugins/check_ntp_time.c b/plugins/check_ntp_time.c index 1300faea..9e0beb9c 100644 --- a/plugins/check_ntp_time.c +++ b/plugins/check_ntp_time.c | |||
| @@ -348,7 +348,6 @@ static offset_request_wrapper offset_request(const char *host, const char *port, | |||
| 348 | is_socket = false; | 348 | is_socket = false; |
| 349 | 349 | ||
| 350 | /* fill in ai with the list of hosts resolved by the host name */ | 350 | /* fill in ai with the list of hosts resolved by the host name */ |
| 351 | struct addrinfo *addresses = NULL; | ||
| 352 | int ga_result = getaddrinfo(host, port, &hints, &addresses); | 351 | int ga_result = getaddrinfo(host, port, &hints, &addresses); |
| 353 | if (ga_result != 0) { | 352 | if (ga_result != 0) { |
| 354 | die(STATE_UNKNOWN, "error getting address for %s: %s\n", host, gai_strerror(ga_result)); | 353 | die(STATE_UNKNOWN, "error getting address for %s: %s\n", host, gai_strerror(ga_result)); |
