xstrdup() not called anywhere in source. Removed.

This commit is contained in:
Aaron Traas 2017-06-21 13:50:13 -04:00
parent 79ffdb36f0
commit 3c8530663d
2 changed files with 0 additions and 11 deletions

View file

@ -89,7 +89,6 @@ extern bool oldstyle, editline, prompt;
#define READ_MODE "rb"
#define WRITE_MODE "wb"
extern void* xmalloc(size_t size);
extern char* xstrdup(const char*);
extern void packed_to_token(long, char token[]);
extern void token_to_packed(char token[], long*);
extern void vspeak(const char*, va_list);

10
misc.c
View file

@ -21,16 +21,6 @@ void* xmalloc(size_t size)
return (ptr);
}
char* xstrdup(const char* s)
{
char* ptr = strdup(s);
if (ptr == NULL) {
fprintf(stderr, "Out of memory!\n");
exit(EXIT_FAILURE);
}
return (ptr);
}
void packed_to_token(long packed, char token[6])
{
// Unpack and map back to ASCII.