From 3dfa4488b032fc32aaf2470f48ac1fc3a534794f Mon Sep 17 00:00:00 2001 From: Yasuyuki KOZAKAI Date: Tue, 24 Jul 2007 05:45:33 +0000 Subject: Moves common fw_malloc() and fw_calloc() to xtables.c --- iptables.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) (limited to 'iptables.c') diff --git a/iptables.c b/iptables.c index 83b0c820..166016e3 100644 --- a/iptables.c +++ b/iptables.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -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) { -- cgit v1.2.3