projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix syntax error introduced by previous
[collectd.git]
/
src
/
iptables.c
diff --git
a/src/iptables.c
b/src/iptables.c
index
286c6e9
..
8fad588
100644
(file)
--- a/
src/iptables.c
+++ b/
src/iptables.c
@@
-86,8
+86,8
@@
typedef struct {
char name[64];
} ip_chain_t;
char name[64];
} ip_chain_t;
-static ip_chain_t **chain_list
= NULL
;
-static int chain_num
= 0
;
+static ip_chain_t **chain_list;
+static int chain_num;
static int iptables_config(const char *key, const char *value) {
/* int ip_value; */
static int iptables_config(const char *key, const char *value) {
/* int ip_value; */
@@
-113,8
+113,7
@@
static int iptables_config(const char *key, const char *value) {
value_copy = strdup(value);
if (value_copy == NULL) {
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;
}
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) {
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;
}
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) {
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;
}
sfree(temp.rule.comment);
return 1;
}