diff lib-src/cvtmail.c @ 440:8de8e3f6228a r21-2-28

Import from CVS: tag r21-2-28
author cvs
date Mon, 13 Aug 2007 11:33:38 +0200
parents 84b14dcb0985
children abe6d1db359e
line wrap: on
line diff
--- a/lib-src/cvtmail.c	Mon Aug 13 11:32:27 2007 +0200
+++ b/lib-src/cvtmail.c	Mon Aug 13 11:33:38 2007 +0200
@@ -41,8 +41,8 @@
 #include <string.h>
 #include <stdlib.h>
 
-static void *xmalloc (unsigned int);
-static void *xrealloc (char *ptr, unsigned int);
+static void *xmalloc (size_t);
+static void *xrealloc (void *, size_t);
 static void skip_to_lf (FILE *stream);
 static void fatal (CONST char *s1, CONST char *s2);
 static void error (CONST char *s1, CONST char *s2);
@@ -111,8 +111,7 @@
 }
 
 static void
-skip_to_lf (stream)
-     FILE *stream;
+skip_to_lf (FILE *stream)
 {
   register int c;
   while ((c = getc(stream)) != '\n')
@@ -120,21 +119,18 @@
 }
 
 static void *
-xmalloc (size)
-     unsigned size;
+xmalloc (size_t size)
 {
-  char *result = (char *) malloc (size);
+  void *result = malloc (size);
   if (!result)
     fatal ("virtual memory exhausted", 0);
   return result;
 }
 
 static void *
-xrealloc (ptr, size)
-     char *ptr;
-     unsigned size;
+xrealloc (void *ptr, size_t size)
 {
-  char *result = (char *) realloc (ptr, size);
+  void *result = realloc (ptr, size);
   if (!result)
     fatal ("virtual memory exhausted", 0);
   return result;