summaryrefslogtreecommitdiffstats
path: root/src/nfacct.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2012-01-01 15:58:11 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2012-01-01 15:58:11 +0100
commit3d0777ffc144f6d616a6adf042a6efd7cfc40027 (patch)
tree53b91f79368a40ea944f095b648d2ca789db3526 /src/nfacct.c
parentf2b8c0ffb5a47e0cf77b54a59852c3f9ee29c0a2 (diff)
nfacct: use return instead of exit(EXIT_FAILURE)
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/nfacct.c')
-rw-r--r--src/nfacct.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nfacct.c b/src/nfacct.c
index a1bb47e..e282b82 100644
--- a/src/nfacct.c
+++ b/src/nfacct.c
@@ -172,7 +172,7 @@ static int nfacct_cmd_list(int argc, char *argv[])
if (mnl_socket_sendto(nl, nlh, nlh->nlmsg_len) < 0) {
perror("mnl_socket_send");
- exit(EXIT_FAILURE);
+ return -1;
}
ret = mnl_socket_recvfrom(nl, buf, sizeof(buf));
@@ -202,13 +202,13 @@ static int nfacct_cmd_add(int argc, char *argv[])
if (argc < 3) {
nfacct_perror("missing object name");
- exit(EXIT_FAILURE);
+ return -1;
}
nfacct = nfacct_alloc();
if (nfacct == NULL) {
nfacct_perror("OOM");
- exit(EXIT_FAILURE);
+ return -1;
}
nfacct_attr_set(nfacct, NFACCT_ATTR_NAME, argv[2]);
@@ -328,7 +328,7 @@ static int nfacct_cmd_get(int argc, char *argv[])
if (argc < 3) {
nfacct_perror("missing object name");
- exit(EXIT_FAILURE);
+ return -1;
}
if (argc == 4) {
@@ -340,7 +340,7 @@ static int nfacct_cmd_get(int argc, char *argv[])
nfacct = nfacct_alloc();
if (nfacct == NULL) {
nfacct_perror("OOM");
- exit(EXIT_FAILURE);
+ return -1;
}
nfacct_attr_set(nfacct, NFACCT_ATTR_NAME, argv[2]);