From 760e2e32820091d8facca427bdc09c7df38c0c28 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 13 Jun 2017 09:42:18 -0400 Subject: [PATCH] Remove more unused code. --- advent.h | 1 - misc.c | 11 ----------- 2 files changed, 12 deletions(-) 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); -- 2.31.1