summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorPhil Mellor <phil@monkeyson.info>2002-09-11 14:24:02 +0000
committerPhil Mellor <phil@monkeyson.info>2002-09-11 14:24:02 +0000
commit811106028fd050cdee11fbc8732ba39f2de5e12a (patch)
tree0194609193dc142881958ff81bef57f07da71b54 /utils
parenta46eef0002d061c3363756182a592be7646ae79b (diff)
downloadnetsurf-811106028fd050cdee11fbc8732ba39f2de5e12a.tar.gz
netsurf-811106028fd050cdee11fbc8732ba39f2de5e12a.tar.bz2
[project @ 2002-09-11 14:24:02 by monkeyson]
RISC OS Wimp GUI. svn path=/import/netsurf/; revision=33
Diffstat (limited to 'utils')
-rw-r--r--utils/utils.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/utils/utils.c b/utils/utils.c
index ffdf029ae..923c16e26 100644
--- a/utils/utils.c
+++ b/utils/utils.c
@@ -1,5 +1,5 @@
/**
- * $Id: utils.c,v 1.4 2002/06/21 18:16:24 bursa Exp $
+ * $Id: utils.c,v 1.5 2002/09/11 14:24:02 monkeyson Exp $
*/
#include <ctype.h>
@@ -46,6 +46,14 @@ void * xrealloc(void * p, const size_t size)
return p;
}
+void xfree(void* p)
+{
+ if (p == 0)
+ fprintf(stderr, "Attempt to free NULL pointer\n");
+ else
+ free(p);
+}
+
char * xstrdup(const char * const s)
{
char * c = malloc(strlen(s) + 1);