<<< Date Index >>>     <<< Thread Index >>>

[PATCH] wipe duplicated and unused code



Hello,
this wipes duplicated code, which I introduced a while ago. Patch
attached - as usual against CVS HEAD.

        Thomas
diff -Nru a/muttlib.c b/muttlib.c
--- a/muttlib.c 2004-08-08 20:20:37 +02:00
+++ b/muttlib.c 2004-08-25 21:46:01 +02:00
@@ -654,7 +654,7 @@
   FREE (&(*p)->date);
   FREE (&(*p)->x_label);
 
-  mutt_free_buffer (&(*p)->spam);
+  mutt_buffer_free (&(*p)->spam);
 
   mutt_free_list (&(*p)->references);
   mutt_free_list (&(*p)->in_reply_to);
@@ -1344,15 +1344,6 @@
   return b;
 }
 
-void mutt_buffer_free(BUFFER **b)
-{
-  if (!b)
-    return;
-  if ((*b)->data)
-    safe_free(&((*b)->data));
-  safe_free(b);
-}
-
 void mutt_buffer_addstr (BUFFER* buf, const char* s)
 {
   mutt_buffer_add (buf, s, mutt_strlen (s));
@@ -1363,7 +1354,7 @@
   mutt_buffer_add (buf, &c, 1);
 }
 
-void mutt_free_buffer (BUFFER **p)
+void mutt_buffer_free (BUFFER **p)
 {
   if (!*p) return;
 
diff -Nru a/protos.h b/protos.h
--- a/protos.h  2004-08-08 20:20:37 +02:00
+++ b/protos.h  2004-08-25 21:46:31 +02:00
@@ -38,7 +38,6 @@
 void mutt_buffer_add (BUFFER*, const char*, size_t);
 void mutt_buffer_addstr (BUFFER*, const char*);
 void mutt_buffer_addch (BUFFER*, char);
-void mutt_free_buffer (BUFFER **);
 
 #define mutt_system(x) _mutt_system(x,0)
 int _mutt_system (const char *, int);