/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1998-2007 The OpenLDAP Foundation.
+ * Copyright 1998-2009 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
{
char *ptr, ibuf[64]; /* many digits */
struct berval ibv, tmp, vtmp;
- int i;
+ unsigned i;
ibv.bv_val = ibuf;
for (i=0; i<a->a_numvals; i++) {
- ibv.bv_len = sprintf(ibv.bv_val, "{%d}", i);
+ ibv.bv_len = sprintf(ibv.bv_val, "{%u}", i);
vtmp = a->a_vals[i];
if ( vtmp.bv_val[0] == '{' ) {
ptr = ber_bvchr(&vtmp, '}');
k = strtol( vals[i].bv_val + 1, &next, 0 );
if ( next == vals[i].bv_val + 1 ||
next[ 0 ] != '}' ||
- next - vals[i].bv_val > vals[i].bv_len )
+ (ber_len_t) (next - vals[i].bv_val) > vals[i].bv_len )
{
ch_free( nnew );
ch_free( new );