diff options
author | Nathan Angelacos <nangel@alpinelinux.org> | 2008-06-03 02:12:16 +0000 |
---|---|---|
committer | Nathan Angelacos <nangel@alpinelinux.org> | 2008-06-03 02:12:16 +0000 |
commit | bf7b2fbe64c6fa27b094dd7e0b739a9674d9c17c (patch) | |
tree | cff14153cc0add546eb65051ddc3f09f01698159 /src | |
parent | f7ef0f79a30a1390d6d27f2d90c84505a8d95a7b (diff) | |
download | haserl-bf7b2fbe64c6fa27b094dd7e0b739a9674d9c17c.tar.bz2 haserl-bf7b2fbe64c6fa27b094dd7e0b739a9674d9c17c.tar.xz |
minor test changes
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/common.c | 1 | ||||
-rw-r--r-- | src/h_script.c | 1 | ||||
-rw-r--r-- | src/haserl.c | 33 | ||||
-rw-r--r-- | src/rfc2388.c | 1 |
5 files changed, 5 insertions, 33 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index c12fc80..a2b26ca 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -46,7 +46,7 @@ bin_PROGRAMS = haserl haserl_SOURCES = common.c common.h sliding_buffer.c sliding_buffer.h \ h_error.c h_error.h h_script.c h_script.h rfc2388.c rfc2388.h \ - llist.c \ + llist.c xmalloc.c \ $(BASHSOURCE) $(LUASOURCE) haserl.c haserl.h install-strip: diff --git a/src/common.c b/src/common.c index 2ee4afb..bf877b5 100644 --- a/src/common.c +++ b/src/common.c @@ -30,6 +30,7 @@ #include <ctype.h> #include "common.h" +#include "xmalloc.h" #include "h_error.h" diff --git a/src/h_script.c b/src/h_script.c index 029fc41..019cbf2 100644 --- a/src/h_script.c +++ b/src/h_script.c @@ -32,6 +32,7 @@ #include <ctype.h> #include "common.h" +#include "xmalloc.h" #include "h_error.h" #include "h_script.h" #include "h_bash.h" diff --git a/src/haserl.c b/src/haserl.c index 3126c41..59b38d6 100644 --- a/src/haserl.c +++ b/src/haserl.c @@ -55,6 +55,7 @@ #include "h_script.h" #include "sliding_buffer.h" #include "rfc2388.h" +#include "xmalloc.h" #ifdef INCLUDE_BASHSHELL #include "h_bash.h" #endif @@ -179,38 +180,6 @@ unescape_url (char *url) } - - -/* - * allocate memory or die, busybox style. - */ -void * -xmalloc (size_t size) -{ - void *buf; - if ((buf = malloc (size)) == NULL) - { - die_with_message (NULL, NULL, g_err_msg[E_MALLOC_FAIL]); - } - memset (buf, 0, size); - return buf; -} - - -/* - * realloc memory, or die xmalloc style. - */ -void * -xrealloc (void *buf, size_t size) -{ - if ((buf = realloc (buf, size)) == NULL) - { - die_with_message (NULL, NULL, g_err_msg[E_MALLOC_FAIL]); - } - return buf; -} - - /* * adds or replaces the "key=value" value in the env_list chain * prefix is appended to the key (e.g. FORM_key=value) diff --git a/src/rfc2388.c b/src/rfc2388.c index 8aa5d19..4a261b3 100644 --- a/src/rfc2388.c +++ b/src/rfc2388.c @@ -42,6 +42,7 @@ #include "h_bash.h" #include "sliding_buffer.h" #include "rfc2388.h" +#include "xmalloc.h" #include "haserl.h" |