]> sjero.net Git - wget/commitdiff
[svn] snprintf.c: Replace `short int' and `unsigned short int' with `int' when
authorhniksic <devnull@localhost>
Mon, 3 Dec 2001 18:28:08 +0000 (10:28 -0800)
committerhniksic <devnull@localhost>
Mon, 3 Dec 2001 18:28:08 +0000 (10:28 -0800)
using it as the second argument to `va_arg'.
Published in <sxsu1v8xisg.fsf@florida.arsdigita.de>.

src/ChangeLog
src/snprintf.c

index 9096035b0dd1f0a74abcfd844fafd16265549b22..3bdb9fa8fc37ecb5a55e5ba3285c1c1164811a96 100644 (file)
@@ -1,3 +1,8 @@
+2001-12-03  Hrvoje Niksic  <hniksic@arsdigita.com>
+
+       * snprintf.c (dopr): Replace `short int' and `unsigned short int'
+       with `int' when using it as the second argument to `va_arg'.
+
 2001-12-03  Hrvoje Niksic  <hniksic@arsdigita.com>
 
        * host.c (address_list_new_one): New function.
index e9a643e347ee22d1c96727d5385217a861ea4a90..237ba5d49420406ffd26cc134444bc03652f87d9 100644 (file)
@@ -68,6 +68,7 @@
  *    include <stdio.h> for NULL.
  *    added support and test cases for long long.
  *    don't declare argument types to (v)snprintf if stdarg is not used.
+ *    use int instead of short int as 2nd arg to va_arg.
  *
  **************************************************************/
 
@@ -308,7 +309,7 @@ static int dopr (char *buffer, size_t maxlen, const char *format, va_list args)
       case 'd':
       case 'i':
        if (cflags == DP_C_SHORT) 
-         value = va_arg (args, short int);
+         value = va_arg (args, int);
        else if (cflags == DP_C_LONG)
          value = va_arg (args, long int);
        else if (cflags == DP_C_LLONG)
@@ -320,7 +321,7 @@ static int dopr (char *buffer, size_t maxlen, const char *format, va_list args)
       case 'o':
        flags |= DP_F_UNSIGNED;
        if (cflags == DP_C_SHORT)
-         value = va_arg (args, unsigned short int);
+         value = va_arg (args, int);
        else if (cflags == DP_C_LONG)
          value = va_arg (args, unsigned long int);
        else if (cflags == DP_C_LLONG)
@@ -332,7 +333,7 @@ static int dopr (char *buffer, size_t maxlen, const char *format, va_list args)
       case 'u':
        flags |= DP_F_UNSIGNED;
        if (cflags == DP_C_SHORT)
-         value = va_arg (args, unsigned short int);
+         value = va_arg (args, int);
        else if (cflags == DP_C_LONG)
          value = va_arg (args, unsigned long int);
        else if (cflags == DP_C_LLONG)
@@ -346,7 +347,7 @@ static int dopr (char *buffer, size_t maxlen, const char *format, va_list args)
       case 'x':
        flags |= DP_F_UNSIGNED;
        if (cflags == DP_C_SHORT)
-         value = va_arg (args, unsigned short int);
+         value = va_arg (args, int);
        else if (cflags == DP_C_LONG)
          value = va_arg (args, unsigned long int);
        else if (cflags == DP_C_LLONG)