ber_tag_t tag ));
-static ber_len_t
+static int
ber_calc_taglen( ber_tag_t tag )
{
int i;
int nosos )
{
int rc;
- ber_len_t taglen;
- ber_len_t i;
+ int taglen;
+ int i;
unsigned char nettag[sizeof(ber_tag_t)];
assert( ber != NULL );
ber_tag_t tag )
{
int rc;
- int i, j, sign;
- ber_len_t len, lenlen, taglen;
+ int i, j, sign, taglen, lenlen;
+ ber_len_t len;
ber_uint_t unum, mask;
unsigned char netnum[sizeof(ber_uint_t)];
ber_len_t len,
ber_tag_t tag )
{
- ber_len_t taglen, lenlen;
- int rc;
+ int taglen, lenlen, rc;
assert( ber != NULL );
assert( str != NULL );
ber_len_t blen /* in bits */,
ber_tag_t tag )
{
- ber_len_t taglen, lenlen, len;
+ int taglen, lenlen;
+ ber_len_t len;
unsigned char unusedbits;
assert( ber != NULL );
int
ber_put_null( BerElement *ber, ber_tag_t tag )
{
- ber_len_t taglen;
+ int taglen;
assert( ber != NULL );
assert( LBER_VALID( ber ) );
ber_int_t boolval,
ber_tag_t tag )
{
- ber_len_t taglen;
+ int taglen;
unsigned char c;
assert( ber != NULL );
int rc;
ber_len_t len;
unsigned char netlen[sizeof(ber_len_t)];
- ber_len_t taglen, lenlen;
+ int taglen;
+ ber_len_t lenlen;
unsigned char ltag = 0x80U + FOUR_BYTE_LEN - 1;
Seqorset *next;
Seqorset **sos = &ber->ber_sos;
(*sos)->sos_ber->ber_ptr += len;
} else {
- ber_len_t i;
+ int i;
unsigned char nettag[sizeof(ber_tag_t)];
ber_tag_t tmptag = (*sos)->sos_tag;
/* Now look for the length */
if (*ber->ber_ptr & 0x80) { /* multi-byte */
int llen = *(unsigned char *)ber->ber_ptr++ & 0x7f;
- if (llen > sizeof(ber_len_t)) {
+ if (llen > (int)sizeof(ber_len_t)) {
errno = ERANGE;
return LBER_DEFAULT;
}
ld->ld_cache->lc_memused -= msg_size( m );
ldap_msgfree( m );
} else {
- if ( m->lm_msgtype == (int)msgtype &&
+ if ( m->lm_msgtype == msgtype &&
request_cmp( m->lm_ber, &reqber ) == 0 ) {
break;
}
int sref,
int *hadrefp )
{
- int rc, count, len;
+ int rc, count;
+ unsigned len;
char *p, *ref, *unfollowed;
LDAPRequest *origreq;
LDAPURLDesc *srv;
build_result_ber( LDAP *ld, BerElement **bp, LDAPRequest *lr )
{
ber_len_t len;
- ber_int_t tag;
+ ber_tag_t tag;
ber_int_t along;
BerElement *ber;
char *
ldap_scherr2str(int code)
{
- if ( code < 0 || code >= (sizeof(err2text)/sizeof(char *)) ) {
+ if ( code < 0 || code >= (int)(sizeof(err2text)/sizeof(char *)) ) {
return "Unknown error";
} else {
return err2text[code];
/* Get UTF-8 sequence length from 1st byte */
utflen = LDAP_UTF8_CHARLEN2(utf8char, utflen);
- if( utflen==0 || utflen > LDAP_MAX_UTF8_LEN )
+ if( utflen==0 || utflen > (int)LDAP_MAX_UTF8_LEN )
return -1; /* Invalid input */
/* First byte minus length tag */
/* Get UTF-8 sequence length from 1st byte */
utflen = LDAP_UTF8_CHARLEN2(utf8str, utflen);
- if( utflen==0 || utflen > LDAP_MAX_UTF8_LEN )
+ if( utflen==0 || utflen > (int)LDAP_MAX_UTF8_LEN )
return -1; /* Invalid input */
/* First byte minus length tag */
}
if (matched) {
- if (ms == ~0)
+ if (ms == ~0UL)
ms = lp - text;
else
me = sp - text;
*match_start = ms;
*match_end = me;
- return (ms != ~0) ? 1 : 0;
+ return (ms != ~0UL) ? 1 : 0;
}
const struct berval * passwd,
const struct berval * cred )
{
- int i;
+ unsigned int i;
int rtn;
for( i=0; i<cred->bv_len; i++) {
const struct berval * passwd,
const struct berval * cred )
{
- int i;
+ unsigned int i;
int rtn;
for( i=0; i<cred->bv_len; i++) {
const struct berval * cred )
{
char *cr;
- int i;
+ unsigned int i;
for( i=0; i<cred->bv_len; i++) {
if(cred->bv_val[i] == '\0') {
const struct berval * passwd,
const struct berval * cred )
{
- int i;
+ unsigned int i;
char *pw,*cr;
for( i=0; i<cred->bv_len; i++) {
{
struct berval hash;
unsigned char salt[32]; /* salt suitable for most anything */
- int i;
+ unsigned int i;
for( i=0; i<passwd->bv_len; i++) {
if(passwd->bv_val[i] == '\0') {