_Bool send_successful = 0;
if (gettimeofday(&tv_begin, NULL) < 0) {
- char errbuf[1024];
- ERROR("ping plugin: gettimeofday failed: %s",
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ ERROR("ping plugin: gettimeofday failed: %s", STRERRNO);
ping_thread_error = 1;
break;
}
(void)ping_dispatch_all(pingobj);
if (gettimeofday(&tv_end, NULL) < 0) {
- char errbuf[1024];
- ERROR("ping plugin: gettimeofday failed: %s",
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ ERROR("ping plugin: gettimeofday failed: %s", STRERRNO);
ping_thread_error = 1;
break;
}
tmp = strdup(value);
if (tmp == NULL) {
- char errbuf[1024];
ERROR("ping plugin: Setting `%s' to `%s' failed: strdup failed: %s", name,
- value, sstrerror(errno, errbuf, sizeof(errbuf)));
+ value, STRERRNO);
return 1;
}
hl = malloc(sizeof(*hl));
if (hl == NULL) {
- char errbuf[1024];
- ERROR("ping plugin: malloc failed: %s",
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ ERROR("ping plugin: malloc failed: %s", STRERRNO);
return 1;
}
host = strdup(value);
if (host == NULL) {
- char errbuf[1024];
sfree(hl);
- ERROR("ping plugin: strdup failed: %s",
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ ERROR("ping plugin: strdup failed: %s", STRERRNO);
return 1;
}
} /* }}} for (i = 0; i < size; i++) */
ping_data[size] = 0;
} else
- WARNING("ping plugin: Ignoring invalid Size %zu.", size);
+ WARNING("ping plugin: Ignoring invalid Size %" PRIsz ".", size);
} else if (strcasecmp(key, "Timeout") == 0) {
double tmp;