use more ad-hoc list handling function, and avoid to muck with ->next
[apps/madmutt.git] / hcache.c
index 8560ef6..da3d6bb 100644 (file)
--- a/hcache.c
+++ b/hcache.c
@@ -236,14 +236,12 @@ restore_parameter (PARAMETER ** p, const unsigned char *d, int *off)
   restore_int (&counter, d, off);
 
   while (counter) {
-    *p = p_new(PARAMETER, 1);
+    *p = parameter_new();
     restore_char (&(*p)->attribute, d, off);
     restore_char (&(*p)->value, d, off);
     p = &(*p)->next;
     counter--;
   }
-
-  *p = NULL;
 }
 
 static unsigned char *dump_body (BODY * c, unsigned char *d, int *off)