diff options
author | Adriaan de Jong | 2012-02-05 12:51:24 +0100 |
---|---|---|
committer | David Sommerseth | 2012-02-05 13:01:24 +0100 |
commit | 2b7deeb6632582fcfb23492e77bb09395d1be4ca (patch) | |
tree | eb6a329bae3eb76f390278bd926a10112f426dee | |
parent | 5b5420573cd6c78e1a87eaa4946e13b9150f9076 (diff) | |
download | openvpn-2b7deeb6632582fcfb23492e77bb09395d1be4ca.zip openvpn-2b7deeb6632582fcfb23492e77bb09395d1be4ca.tar.gz |
Moved out of memory prototype to error.h, as the definition is in error.c
Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
-rw-r--r-- | buffer.h | 4 | ||||
-rw-r--r-- | error.h | 3 |
2 files changed, 4 insertions, 3 deletions
@@ -26,6 +26,7 @@ #define BUFFER_H #include "basic.h" +#include "error.h" #define BUF_SIZE_MAX 1000000 @@ -810,8 +811,6 @@ gc_reset (struct gc_arena *a) * Allocate memory to hold a structure */ -void out_of_memory (void); - #define ALLOC_OBJ(dptr, type) \ { \ check_malloc_return ((dptr) = (type *) malloc (sizeof (type))); \ @@ -862,7 +861,6 @@ void out_of_memory (void); static inline void check_malloc_return (void *p) { - void out_of_memory (void); if (!p) out_of_memory (); } @@ -244,6 +244,9 @@ HANDLE get_orig_stderr (void); /* exit program */ void openvpn_exit (const int status); +/* exit program on out of memory error */ +void out_of_memory (void); + /* * Check the return status of read/write routines. */ |