X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fdaemon%2Fconfigfile.c;h=e61128eb6809aa63c7f03aef9dda91b1e39f3fa7;hb=a18496a4ac759552fd4dac1d2c661fb50285b1a1;hp=f5086ae64de751f75c8b9bc20139a9e81c074a5f;hpb=196f5bd17880d91ba0da33a8f5f6168d039cfa0c;p=collectd.git diff --git a/src/daemon/configfile.c b/src/daemon/configfile.c index f5086ae6..e61128eb 100644 --- a/src/daemon/configfile.c +++ b/src/daemon/configfile.c @@ -634,9 +634,7 @@ static oconfig_item_t *cf_read_dir(const char *dir, const char *pattern, dh = opendir(dir); if (dh == NULL) { - char errbuf[1024]; - ERROR("configfile: opendir failed: %s", - sstrerror(errno, errbuf, sizeof(errbuf))); + ERROR("configfile: opendir failed: %s", STRERRNO); return NULL; } @@ -765,9 +763,7 @@ static oconfig_item_t *cf_read_generic(const char *path, const char *pattern, status = stat(path_ptr, &statbuf); if (status != 0) { - char errbuf[1024]; - WARNING("configfile: stat (%s) failed: %s", path_ptr, - sstrerror(errno, errbuf, sizeof(errbuf))); + WARNING("configfile: stat (%s) failed: %s", path_ptr, STRERRNO); continue; } @@ -813,9 +809,7 @@ static oconfig_item_t *cf_read_generic(const char *path, const char *pattern, status = stat(path, &statbuf); if (status != 0) { - char errbuf[1024]; - ERROR("configfile: stat (%s) failed: %s", path, - sstrerror(errno, errbuf, sizeof(errbuf))); + ERROR("configfile: stat (%s) failed: %s", path, STRERRNO); return NULL; }