projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/yaz
[yaz-moved-to-github.git]
/
src
/
ber_int.c
diff --git
a/src/ber_int.c
b/src/ber_int.c
index
f864cbe
..
e7ed655
100644
(file)
--- a/
src/ber_int.c
+++ b/
src/ber_int.c
@@
-1,5
+1,5
@@
/* This file is part of the YAZ toolkit.
/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2009 Index Data
+ * Copyright (C) 1995-2011 Index Data
* See the file LICENSE for details.
*/
* See the file LICENSE for details.
*/
@@
-62,7
+62,8
@@
int ber_encinteger(ODR o, Odr_int val)
{
unsigned long long uval = val;
unsigned char tmp[sizeof(uval)];
{
unsigned long long uval = val;
unsigned char tmp[sizeof(uval)];
- int i, len;
+ int len;
+ size_t i;
for (i = sizeof(uval); i > 0; )
{
tmp[--i] = uval;
for (i = sizeof(uval); i > 0; )
{
tmp[--i] = uval;
@@
-100,7
+101,7
@@
int ber_decinteger(const unsigned char *buf, Odr_int *val, int max)
b += res;
if (*b & 0x80)
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];
uval = (uval << 8) + 0xFF;
for (i = 0; i < len; i++)
uval = (uval << 8) + b[i];