summaryrefslogtreecommitdiffstats
path: root/iptables.c
diff options
context:
space:
mode:
author/C=JP/ST=JP/CN=Yasuyuki Kozakai/emailAddress=yasuyuki@netfilter.org </C=JP/ST=JP/CN=Yasuyuki Kozakai/emailAddress=yasuyuki@netfilter.org>2007-07-24 05:45:33 +0000
committer/C=JP/ST=JP/CN=Yasuyuki Kozakai/emailAddress=yasuyuki@netfilter.org </C=JP/ST=JP/CN=Yasuyuki Kozakai/emailAddress=yasuyuki@netfilter.org>2007-07-24 05:45:33 +0000
commit4c1875afc6d017e83a5530dbce17c41c687e302b (patch)
tree52317cc3cc5562b3784b1a18e3d3e06ea09c1708 /iptables.c
parent9f9ec0183cbf7e8b1ed8a76000b6e8c654d7e28e (diff)
Moves common fw_malloc() and fw_calloc() to xtables.c
Diffstat (limited to 'iptables.c')
-rw-r--r--iptables.c25
1 files changed, 1 insertions, 24 deletions
diff --git a/iptables.c b/iptables.c
index 83b0c82..166016e 100644
--- a/iptables.c
+++ b/iptables.c
@@ -37,6 +37,7 @@
#include <limits.h>
#include <unistd.h>
#include <iptables.h>
+#include <xtables.h>
#include <fcntl.h>
#include <sys/wait.h>
#include <sys/utsname.h>
@@ -579,30 +580,6 @@ check_inverse(const char option[], int *invert, int *optind, int argc)
return FALSE;
}
-static void *
-fw_calloc(size_t count, size_t size)
-{
- void *p;
-
- if ((p = calloc(count, size)) == NULL) {
- perror("iptables: calloc failed");
- exit(1);
- }
- return p;
-}
-
-static void *
-fw_malloc(size_t size)
-{
- void *p;
-
- if ((p = malloc(size)) == NULL) {
- perror("iptables: malloc failed");
- exit(1);
- }
- return p;
-}
-
static struct in_addr *
host_to_addr(const char *name, unsigned int *naddr)
{