]> sjero.net Git - wget/commitdiff
[svn] Made xfree alias to free if memory debugging is not used.
authorhniksic <devnull@localhost>
Mon, 11 Dec 2000 02:17:44 +0000 (18:17 -0800)
committerhniksic <devnull@localhost>
Mon, 11 Dec 2000 02:17:44 +0000 (18:17 -0800)
From <sxsd7ezd7p2.fsf@florida.arsdigita.de>.

src/ChangeLog
src/utils.c
src/wget.h

index 71b318e8be5eaf35087470dc0c069cf9b6f42e0d..d61b223df26118edb3005acc8c455a44bc98b612 100644 (file)
@@ -1,3 +1,10 @@
+2000-12-11  Hrvoje Niksic  <hniksic@arsdigita.com>
+
+       * utils.c (xfree_real): Removed.
+       (xfree_debug): Just call free().
+
+       * wget.h (xfree): Make it an alias for free.
+
 2000-12-11  Hrvoje Niksic  <hniksic@arsdigita.com>
 
        * http.c (http_loop): Furthermore, touch output_document only if
index b59125aaa2fc164fb32d027b7ba046dd2c1abac1..fe62f1b2dc8cbe60c88b4a4f1b45af72ae9ff4ac 100644 (file)
@@ -102,9 +102,9 @@ memfatal (const char *what)
    If memory debugging is not turned on, wget.h defines these:
 
      #define xmalloc xmalloc_real
-     #define xfree xfree_real
      #define xrealloc xrealloc_real
      #define xstrdup xstrdup_real
+     #define xfree free
 
    In case of memory debugging, the definitions are a bit more
    complex, because we want to provide more information, *and* we want
@@ -134,12 +134,6 @@ xmalloc_real (size_t size)
   return ptr;
 }
 
-STATIC_IF_DEBUG void
-xfree_real (void *ptr)
-{
-  free (ptr);
-}
-
 STATIC_IF_DEBUG void *
 xrealloc_real (void *ptr, size_t newsize)
 {
@@ -279,7 +273,7 @@ xfree_debug (void *ptr, const char *source_file, int source_line)
   assert (ptr != NULL);
   ++free_count;
   unregister_ptr (ptr);
-  xfree_real (ptr);
+  free (ptr);
 }
 
 void *
index 4bb92f0491f9ac47895e014fbb2200ea8e4f2962..a97bb5a2b8cf17453fa34f43820b7bf5c45d83a7 100644 (file)
@@ -101,12 +101,11 @@ void logputs PARAMS ((enum log_options, const char *));
 #ifndef DEBUG_MALLOC
 
 #define xmalloc  xmalloc_real
-#define xfree    xfree_real
 #define xrealloc xrealloc_real
 #define xstrdup  xstrdup_real
+#define xfree    free
 
 void *xmalloc_real PARAMS ((size_t));
-void xfree_real PARAMS ((void *));
 void *xrealloc_real PARAMS ((void *, size_t));
 char *xstrdup_real PARAMS ((const char *));