projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tree wide: Replace sstrerror() with STRERRNO.
[collectd.git]
/
src
/
iptables.c
diff --git
a/src/iptables.c
b/src/iptables.c
index
286c6e9
..
2dddacc
100644
(file)
--- a/
src/iptables.c
+++ b/
src/iptables.c
@@
-101,7
+101,7
@@
static int iptables_config(const char *key, const char *value) {
return 1;
ip_chain_t temp = {0};
return 1;
ip_chain_t temp = {0};
- ip_chain_t *final, **list;
+ ip_chain_t *
final, **list;
char *table;
int table_len;
char *chain;
char *table;
int table_len;
char *chain;
@@
-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,17
+181,15
@@
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;
}
chain_list = list;
sfree(temp.rule.comment);
return 1;
}
chain_list = list;
- final = malloc(sizeof(*final));
+ final = malloc(sizeof(*
final));
if (final == NULL) {
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;
}