]> granicus.if.org Git - file/commitdiff
neeed stddef.h for ptrdiff_t
authorChristos Zoulas <christos@zoulas.com>
Thu, 9 Aug 2012 16:40:04 +0000 (16:40 +0000)
committerChristos Zoulas <christos@zoulas.com>
Thu, 9 Aug 2012 16:40:04 +0000 (16:40 +0000)
src/vasprintf.c

index 3faa7fea4e027bafedb2cbd69ab2772be5cf0134..648dda474e46f6a9af966dea27393d0ac5164190 100644 (file)
@@ -108,7 +108,7 @@ you use strange formats.
 #include "file.h"
 
 #ifndef        lint
-FILE_RCSID("@(#)$File: vasprintf.c,v 1.9 2012/08/09 16:33:30 christos Exp $")
+FILE_RCSID("@(#)$File: vasprintf.c,v 1.10 2012/08/09 16:40:04 christos Exp $")
 #endif /* lint */
 
 #include <assert.h>
@@ -119,6 +119,9 @@ FILE_RCSID("@(#)$File: vasprintf.c,v 1.9 2012/08/09 16:33:30 christos Exp $")
 #ifdef HAVE_LIMITS_H
 #include <limits.h>
 #endif
+#ifdef HAVE_STDDEF_H
+#include <stddef.h>
+#endif
 
 #define ALLOC_CHUNK 2048
 #define ALLOC_SECURITY_MARGIN 1024   /* big value because some platforms have very big 'G' exponent */
@@ -398,8 +401,11 @@ static int dispatch(xprintf_struct *s)
       modifier = 'L';  /* 'll' == 'L'      long long == long double */
     } /* only for compatibility ; not portable */
     INCOHERENT_TEST();
-  } else
+    break;
+  default:
     modifier = -1;              /* no modifier specified */
+    break;
+  }
 
   /* type */
   type = *SRCTXT;