X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fprotocols.c;h=59eb49a772e83f95e8406334c697b1be7287e62f;hb=b9b5e5d573d0011c4f3276e9b84b73ba4dd2e870;hp=32e98243d9c2f54f312dba8c866adb93c0d58b68;hpb=867ad628dc6fcd05bd584b605d7093cfc00c3d07;p=collectd.git diff --git a/src/protocols.c b/src/protocols.c index 32e98243..59eb49a7 100644 --- a/src/protocols.c +++ b/src/protocols.c @@ -45,7 +45,7 @@ static const char *config_keys[] = { }; static int config_keys_num = STATIC_ARRAY_SIZE(config_keys); -static ignorelist_t *values_list = NULL; +static ignorelist_t *values_list; /* * Functions @@ -87,8 +87,7 @@ static int read_file(const char *path) { fh = fopen(path, "r"); if (fh == NULL) { - ERROR("protocols plugin: fopen (%s) failed: %s.", path, - sstrerror(errno, key_buffer, sizeof(key_buffer))); + ERROR("protocols plugin: fopen (%s) failed: %s.", path, STRERRNO); return -1; } @@ -156,8 +155,8 @@ static int read_file(const char *path) { if (values_list != NULL) { char match_name[2 * DATA_MAX_NAME_LEN]; - ssnprintf(match_name, sizeof(match_name), "%s:%s", key_buffer, - key_fields[i]); + snprintf(match_name, sizeof(match_name), "%s:%s", key_buffer, + key_fields[i]); if (ignorelist_match(values_list, match_name)) continue;