X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fber_int.c;h=d642aff1110dc778f449e71db5773a6d293704da;hb=03dccce903176e61f889b1558834aa5a09f9f8c0;hp=ca3ea1098bdb47c17f0917a9a49d66a6937c1af4;hpb=88d3bedf772316f87e1996f655ccf8d1e2589755;p=yaz-moved-to-github.git diff --git a/src/ber_int.c b/src/ber_int.c index ca3ea10..d642aff 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-2012 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];