X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fdaemon%2Fplugin.c;h=92b36297cdb6e1e5276b22354eac50b393262156;hb=0b7cd83a5e6bac068ea83a88a5ddcfb07c09fbec;hp=9b75f698adff4f630a6114e2652e0ded5c882fac;hpb=6f30c750cc555fb016db827cd5ff6e1e1c2cc87e;p=collectd.git diff --git a/src/daemon/plugin.c b/src/daemon/plugin.c index 9b75f698..92b36297 100644 --- a/src/daemon/plugin.c +++ b/src/daemon/plugin.c @@ -1009,9 +1009,7 @@ int plugin_load(char const *plugin_name, _Bool global) { } if ((dh = opendir(dir)) == NULL) { - char errbuf[1024]; - ERROR("plugin_load: opendir (%s) failed: %s", dir, - sstrerror(errno, errbuf, sizeof(errbuf))); + ERROR("plugin_load: opendir (%s) failed: %s", dir, STRERRNO); return -1; } @@ -1026,9 +1024,7 @@ int plugin_load(char const *plugin_name, _Bool global) { } if (lstat(filename, &statbuf) == -1) { - char errbuf[1024]; - WARNING("plugin_load: stat (\"%s\") failed: %s", filename, - sstrerror(errno, errbuf, sizeof(errbuf))); + WARNING("plugin_load: stat (\"%s\") failed: %s", filename, STRERRNO); continue; } else if (!S_ISREG(statbuf.st_mode)) { /* don't follow symlinks */ @@ -2462,9 +2458,7 @@ static plugin_ctx_t *plugin_ctx_create(void) { ctx = malloc(sizeof(*ctx)); if (ctx == NULL) { - char errbuf[1024]; - ERROR("Failed to allocate plugin context: %s", - sstrerror(errno, errbuf, sizeof(errbuf))); + ERROR("Failed to allocate plugin context: %s", STRERRNO); return NULL; }