From 76386bde5ed8a834d25a5c62ebeb086f2abcf5e0 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sun, 6 Jan 2002 03:05:02 +0000 Subject: [PATCH] Cleanup lint in previous commit --- libraries/liblber/decode.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/libraries/liblber/decode.c b/libraries/liblber/decode.c index 807bb98de4..2123f28b6b 100644 --- a/libraries/liblber/decode.c +++ b/libraries/liblber/decode.c @@ -49,14 +49,12 @@ ber_get_tag( BerElement *ber ) } if ( ber->ber_ptr == ber->ber_buf ) - xbyte = *ber->ber_ptr; + tag = *(unsigned char *)ber->ber_ptr; else - xbyte = ber->ber_tag; + tag = ber->ber_tag; ber->ber_ptr++; - tag = xbyte; - - if ( (xbyte & LBER_BIG_TAG_MASK) != LBER_BIG_TAG_MASK ) { + if ( (tag & LBER_BIG_TAG_MASK) != LBER_BIG_TAG_MASK ) { return tag; } @@ -152,7 +150,7 @@ ber_skip_tag( BerElement *ber, ber_len_t *len ) if( *len > (ber_len_t) ber_pvt_ber_remaining( ber ) ) { return LBER_DEFAULT; } - ber->ber_tag = *ber->ber_ptr; + ber->ber_tag = *(unsigned char *)ber->ber_ptr; return tag; } @@ -222,7 +220,7 @@ ber_getnint( } else { *num = 0; } - ber->ber_tag = *ber->ber_ptr; + ber->ber_tag = *(unsigned char *)ber->ber_ptr; return len; } @@ -281,7 +279,7 @@ ber_get_stringb( if ( (ber_len_t) ber_read( ber, buf, datalen ) != datalen ) { return LBER_DEFAULT; } - ber->ber_tag = *ber->ber_ptr; + ber->ber_tag = *(unsigned char *)ber->ber_ptr; buf[datalen] = '\0'; @@ -434,7 +432,7 @@ ber_get_stringbv( BerElement *ber, struct berval *bv ) return LBER_DEFAULT; } bv->bv_val[bv->bv_len] = '\0'; - ber->ber_tag = *ber->ber_ptr; + ber->ber_tag = *(unsigned char *)ber->ber_ptr; return tag; } @@ -511,7 +509,7 @@ ber_get_bitstringa( *buf = NULL; return LBER_DEFAULT; } - ber->ber_tag = *ber->ber_ptr; + ber->ber_tag = *(unsigned char *)ber->ber_ptr; *blen = datalen * 8 - unusedbits; return tag; @@ -533,7 +531,7 @@ ber_get_null( BerElement *ber ) if ( len != 0 ) { return LBER_DEFAULT; } - ber->ber_tag = *ber->ber_ptr; + ber->ber_tag = *(unsigned char *)ber->ber_ptr; return( tag ); } @@ -572,7 +570,7 @@ ber_first_element( *last = NULL; return LBER_DEFAULT; } - ber->ber_tag = *ber->ber_ptr; + ber->ber_tag = *(unsigned char *)ber->ber_ptr; *last = ber->ber_ptr + *len; @@ -758,7 +756,7 @@ ber_scanf ( BerElement *ber, if ( (rc = ber_skip_tag( ber, &len )) == LBER_DEFAULT ) break; ber->ber_ptr += len; - ber->ber_tag = *ber->ber_ptr; + ber->ber_tag = *(unsigned char *)ber->ber_ptr; break; case '{': /* begin sequence */ -- 2.39.5