From 19b8065922a92b623ad19a2a3d9169994bfd90da Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Wed, 29 Jul 2009 23:03:10 +0000 Subject: [PATCH] More ITS#6215: Fix va_arg integer types for ber_scanf "bei" & ber_printf "BX" --- libraries/liblber/decode.c | 6 +++--- libraries/liblber/encode.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/liblber/decode.c b/libraries/liblber/decode.c index a256c521e6..f68c61f9bd 100644 --- a/libraries/liblber/decode.c +++ b/libraries/liblber/decode.c @@ -745,7 +745,7 @@ ber_scanf ( BerElement *ber, break; case 'e': /* enumerated */ - case 'i': /* int */ + case 'i': /* integer */ i = va_arg( ap, ber_int_t * ); rc = ber_get_int( ber, i ); break; @@ -899,8 +899,8 @@ ber_scanf ( BerElement *ber, case 'b': /* boolean */ case 'e': /* enumerated */ - case 'i': /* int */ - (void) va_arg( ap, int * ); + case 'i': /* integer */ + (void) va_arg( ap, ber_int_t * ); break; case 'l': /* length of next item */ diff --git a/libraries/liblber/encode.c b/libraries/liblber/encode.c index 0514f2f618..a2098326d4 100644 --- a/libraries/liblber/encode.c +++ b/libraries/liblber/encode.c @@ -578,7 +578,7 @@ ber_printf( BerElement *ber, LDAP_CONST char *fmt, ... ) case 'B': /* bit string */ case 'X': /* bit string (deprecated) */ s = va_arg( ap, char * ); - len = va_arg( ap, int ); /* in bits */ + len = va_arg( ap, ber_len_t ); /* in bits */ rc = ber_put_bitstring( ber, s, len, ber->ber_tag ); break; -- 2.39.5