]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Update.
authorSimon Josefsson <simon@josefsson.org>
Fri, 3 Nov 2006 09:09:46 +0000 (09:09 +0000)
committerSimon Josefsson <simon@josefsson.org>
Fri, 3 Nov 2006 09:09:46 +0000 (09:09 +0000)
lgl/printf-parse.c

index f0247c22c057191a6b3e328e27c920e78b1f9a7c..4256eced09117de12d261b65ed94f90d5ab3547d 100644 (file)
@@ -68,7 +68,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
 
   d->count = 0;
   d_allocated = 1;
-  d->dir = malloc (d_allocated * sizeof (DIRECTIVE));
+  d->dir = (DIRECTIVE *) malloc (d_allocated * sizeof (DIRECTIVE));
   if (d->dir == NULL)
     /* Out of memory.  */
     return -1;
@@ -92,9 +92,9 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
        if (size_overflow_p (memory_size))                              \
          /* Overflow, would lead to out of memory.  */                 \
          goto error;                                                   \
-       memory = (a->arg                                                \
-                 ? realloc (a->arg, memory_size)                       \
-                 : malloc (memory_size));                              \
+       memory = (argument *) (a->arg                                   \
+                              ? realloc (a->arg, memory_size)          \
+                              : malloc (memory_size));                 \
        if (memory == NULL)                                             \
          /* Out of memory.  */                                         \
          goto error;                                                   \
@@ -515,7 +515,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
              if (size_overflow_p (memory_size))
                /* Overflow, would lead to out of memory.  */
                goto error;
-             memory = realloc (d->dir, memory_size);
+             memory = (DIRECTIVE *) realloc (d->dir, memory_size);
              if (memory == NULL)
                /* Out of memory.  */
                goto error;