diff options
author | Sverker Eriksson <[email protected]> | 2016-02-23 20:51:39 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2016-02-23 20:52:25 +0100 |
commit | de5a62838f0a47eb26638046869950ee7f655087 (patch) | |
tree | 3d60d5199eb133289fdba19e9b6aa822c2ab5542 /lib/kernel/examples/uds_dist | |
parent | b855206a1a7788216717ca272f44e9beb1f58e7c (diff) | |
download | otp-de5a62838f0a47eb26638046869950ee7f655087.tar.gz otp-de5a62838f0a47eb26638046869950ee7f655087.tar.bz2 otp-de5a62838f0a47eb26638046869950ee7f655087.zip |
kernel: Remove calls to erl_exit
from debug and example code
Diffstat (limited to 'lib/kernel/examples/uds_dist')
-rw-r--r-- | lib/kernel/examples/uds_dist/c_src/uds_drv.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/kernel/examples/uds_dist/c_src/uds_drv.c b/lib/kernel/examples/uds_dist/c_src/uds_drv.c index e32ad69adf..8c028ba910 100644 --- a/lib/kernel/examples/uds_dist/c_src/uds_drv.c +++ b/lib/kernel/examples/uds_dist/c_src/uds_drv.c @@ -957,28 +957,24 @@ static void put_packet_length(char *b, int len) /* ** Malloc wrappers -** Note! -** The function erl_exit is actually not a pert of the -** driver interface, but it is very nice to use if one wants to halt -** with a core and an erlang crash dump. */ static void *my_malloc(size_t size) { - void erl_exit(int, char *, ...); void *ptr; if ((ptr = driver_alloc(size)) == NULL) { - erl_exit(1,"Could not allocate %lu bytes of memory",(unsigned long) size); + fprintf(stderr, "Could not allocate %lu bytes of memory",(unsigned long) size); + abort(); } return ptr; } static void *my_realloc(void *ptr, size_t size) { - void erl_exit(int, char *, ...); void *nptr; if ((nptr = driver_realloc(ptr, size)) == NULL) { - erl_exit(1,"Could not reallocate %lu bytes of memory",(unsigned long) size); + fprintf(stderr, "Could not reallocate %lu bytes of memory",(unsigned long) size); + abort(); } return nptr; } |