summaryrefslogtreecommitdiff
path: root/src/sha1_lookup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sha1_lookup.c')
-rw-r--r--src/sha1_lookup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sha1_lookup.c b/src/sha1_lookup.c
index f4a3c42cc..6ac00c5aa 100644
--- a/src/sha1_lookup.c
+++ b/src/sha1_lookup.c
@@ -97,7 +97,7 @@ int sha1_entry_pos(const void *table,
unsigned lo, unsigned hi, unsigned nr,
const unsigned char *key)
{
- const unsigned char *base = table;
+ const unsigned char *base = (const unsigned char*)table;
const unsigned char *hi_key, *lo_key;
unsigned ofs_0;
@@ -192,5 +192,5 @@ int sha1_entry_pos(const void *table,
lo_key = mi_key + elem_size;
}
} while (lo < hi);
- return -lo-1;
+ return -((int)lo)-1;
}