Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=fwpl.git;a=commitdiff;h=b0cdba2a2450a09381279dbd94b56e066ce469b6

commit b0cdba2a2450a09381279dbd94b56e066ce469b6
Author: James Buren <r...@frugalware.org>
Date:   Sun Sep 20 13:00:13 2009 -0500

utility.c
* add new function

diff --git a/src/utility.c b/src/utility.c
index 97a8115..638965e 100644
--- a/src/utility.c
+++ b/src/utility.c
@@ -22,6 +22,19 @@ void *xmalloc(size_t size) {
return ptr;
}

+void *xrealloc(void *ptr,size_t size) {
+  assert(ptr and size);
+
+  ptr = realloc(ptr,size);
+
+  if(!ptr) {
+    eprintf("Memory reallocation failure of %u bytes.\n",size);
+    abort();
+  }
+
+  return ptr;
+}
+
char *xstrdup(const char *str1) {
char *str;
size_t size;
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to