Remove more unused code.

This commit is contained in:
Eric S. Raymond 2017-06-13 09:42:18 -04:00
parent 89829f45be
commit 760e2e3282
2 changed files with 0 additions and 12 deletions

View file

@ -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*);

11
misc.c
View file

@ -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);