X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fber_int.c;h=e7ed6554438ae26dc33776b7a3d19140d90851a0;hp=ca3ea1098bdb47c17f0917a9a49d66a6937c1af4;hb=43a9d38d20c1b1bcd1a03b2445a501d27526bd35;hpb=88d3bedf772316f87e1996f655ccf8d1e2589755 diff --git a/src/ber_int.c b/src/ber_int.c index ca3ea10..e7ed655 100644 --- a/src/ber_int.c +++ b/src/ber_int.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2010 Index Data + * Copyright (C) 1995-2011 Index Data * See the file LICENSE for details. */ @@ -88,8 +88,7 @@ int ber_encinteger(ODR o, Odr_int val) int ber_decinteger(const unsigned char *buf, Odr_int *val, int max) { unsigned long long uval = 0; - int len; - size_t i; + int i, len; int res; const unsigned char *b = buf; @@ -102,7 +101,7 @@ int ber_decinteger(const unsigned char *buf, Odr_int *val, int max) b += res; if (*b & 0x80) - for (i = 0; i < sizeof(uval) - len; i++) + for (i = 0; i < (int) sizeof(uval) - len; i++) uval = (uval << 8) + 0xFF; for (i = 0; i < len; i++) uval = (uval << 8) + b[i];