X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fiptables.c;h=bc75d7bc6543bc0fcdcd6828b0cb759608ec93d1;hb=4c4988b1c5d33ed70b2d6d6e5a4eae13cab9255b;hp=286c6e9b6ca4318fa6a1b059e3f1337643434e19;hpb=1b10ab706f8b70ce2f086e59a54cc09d671ad989;p=collectd.git diff --git a/src/iptables.c b/src/iptables.c index 286c6e9b..bc75d7bc 100644 --- a/src/iptables.c +++ b/src/iptables.c @@ -113,8 +113,7 @@ static int iptables_config(const char *key, const char *value) { value_copy = strdup(value); if (value_copy == NULL) { - char errbuf[1024]; - ERROR("strdup failed: %s", sstrerror(errno, errbuf, sizeof(errbuf))); + ERROR("strdup failed: %s", STRERRNO); return 1; } @@ -182,8 +181,7 @@ static int iptables_config(const char *key, const char *value) { list = realloc(chain_list, (chain_num + 1) * sizeof(ip_chain_t *)); if (list == NULL) { - char errbuf[1024]; - ERROR("realloc failed: %s", sstrerror(errno, errbuf, sizeof(errbuf))); + ERROR("realloc failed: %s", STRERRNO); sfree(temp.rule.comment); return 1; } @@ -191,8 +189,7 @@ static int iptables_config(const char *key, const char *value) { chain_list = list; final = malloc(sizeof(*final)); if (final == NULL) { - char errbuf[1024]; - ERROR("malloc failed: %s", sstrerror(errno, errbuf, sizeof(errbuf))); + ERROR("malloc failed: %s", STRERRNO); sfree(temp.rule.comment); return 1; }