summaryrefslogtreecommitdiff
path: root/Build/source/libs/gmp/gmp-src/printf/repl-vsnprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/gmp/gmp-src/printf/repl-vsnprintf.c')
-rw-r--r--Build/source/libs/gmp/gmp-src/printf/repl-vsnprintf.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/Build/source/libs/gmp/gmp-src/printf/repl-vsnprintf.c b/Build/source/libs/gmp/gmp-src/printf/repl-vsnprintf.c
index a95003baa62..d2286712218 100644
--- a/Build/source/libs/gmp/gmp-src/printf/repl-vsnprintf.c
+++ b/Build/source/libs/gmp/gmp-src/printf/repl-vsnprintf.c
@@ -5,7 +5,7 @@
CERTAIN TO BE SUBJECT TO INCOMPATIBLE CHANGES OR DISAPPEAR COMPLETELY IN
FUTURE GNU MP RELEASES.
-Copyright 2001, 2002 Free Software Foundation, Inc.
+Copyright 2001, 2002, 2018 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -35,9 +35,6 @@ see https://www.gnu.org/licenses/. */
#include "config.h"
-#if ! HAVE_VSNPRINTF /* only need this file if we don't have vsnprintf */
-
-
#define _GNU_SOURCE /* for strnlen prototype */
#include <stdarg.h>
@@ -63,10 +60,11 @@ see https://www.gnu.org/licenses/. */
#include <sys/types.h> /* for quad_t */
#endif
-#include "gmp.h"
#include "gmp-impl.h"
+#if ! HAVE_VSNPRINTF /* only need this file if we don't have vsnprintf */
+
/* Autoconf notes that AIX 4.3 has a broken strnlen, but fortunately it
doesn't affect us since __gmp_replacement_vsnprintf is not required on
that system. */
@@ -244,7 +242,7 @@ __gmp_replacement_vsnprintf (char *buf, size_t buf_size,
}
else
(void) va_arg (ap, double);
- break;
+ goto next;
case 'f':
/* Requested decimals, sign and point, and a margin for error,
@@ -265,7 +263,7 @@ __gmp_replacement_vsnprintf (char *buf, size_t buf_size,
(void) va_arg (ap, double);
total_width += double_digits;
}
- break;
+ goto next;
case 'h': /* short or char */
case 'j': /* intmax_t */
@@ -383,7 +381,7 @@ __gmp_replacement_vsnprintf (char *buf, size_t buf_size,
memcpy (buf, s, copylen);
buf[copylen] = '\0';
}
- (*__gmp_free_func) (s, total_width);
+ __GMP_FREE_FUNC_TYPE (s, total_width, char);
}
/* If total_width was somehow wrong then chances are we've already