From: Eric S. Raymond Date: Tue, 13 Jun 2017 13:42:18 +0000 (-0400) Subject: Remove more unused code. X-Git-Tag: 1.1~357 X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=commitdiff_plain;h=760e2e32820091d8facca427bdc09c7df38c0c28 Remove more unused code. --- diff --git a/advent.h b/advent.h index c9fc431..9c07cf3 100644 --- a/advent.h +++ b/advent.h @@ -86,7 +86,6 @@ extern lcg_state lcgstate; /* b is not needed for POSIX but harmless */ #define READ_MODE "rb" #define WRITE_MODE "wb" -extern void* xmalloc(size_t); extern char* xstrdup(const char*); extern void packed_to_token(long, char token[6]); extern void newspeak(char*); diff --git a/misc.c b/misc.c index 16c6a78..a58e461 100644 --- a/misc.c +++ b/misc.c @@ -10,17 +10,6 @@ #include "linenoise/linenoise.h" #include "newdb.h" -void* xmalloc(size_t size) -{ - void* ptr = malloc(size); - if (ptr == NULL) - { - fprintf(stderr, "Out of memory!\n"); - exit(EXIT_FAILURE); - } - return(ptr); -} - char* xstrdup(const char* s) { char* ptr = strdup(s);