FILE *fh = fopen(st->file, "r");
if (fh == NULL) {
- char errbuf[1024];
- WARNING("openvpn plugin: fopen(%s) failed: %s", st->file,
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ WARNING("openvpn plugin: fopen(%s) failed: %s", st->file, STRERRNO);
return -1;
}
char *status_file = strdup(value);
if (status_file == NULL) {
- char errbuf[1024];
- ERROR("openvpn plugin: strdup failed: %s",
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ ERROR("openvpn plugin: strdup failed: %s", STRERRNO);
return 1;
}
/* create a new vpn element */
vpn_status_t *instance = calloc(1, sizeof(*instance));
if (instance == NULL) {
- char errbuf[1024];
- ERROR("openvpn plugin: malloc failed: %s",
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ ERROR("openvpn plugin: malloc failed: %s", STRERRNO);
sfree(status_file);
return 1;
}
/* group = */ "openvpn",
/* name = */ callback_name,
/* callback = */ openvpn_read,
- /* interval = */ 0,
- &(user_data_t){
- .data = instance, .free_func = openvpn_free,
- });
+ /* interval = */ 0, &(user_data_t){
+ .data = instance, .free_func = openvpn_free,
+ });
if (status == EINVAL) {
WARNING("openvpn plugin: status filename \"%s\" "