summaryrefslogtreecommitdiff
path: root/navit/cache.c
diff options
context:
space:
mode:
authorSebastian Leske <sebastian.leske@sleske.name>2016-05-30 18:50:54 +0200
committerSebastian Leske <sebastian.leske@sleske.name>2016-05-31 22:35:48 +0200
commit0fc5fdb0b3f47c4efa1098d03da10ea39cb4c3bb (patch)
tree5571e1a78678e9dc11b54bb3c8662e19e5fe6b69 /navit/cache.c
parentdce47eec67da325662603f47b03dfc53a8e1f957 (diff)
downloadnavit-0fc5fdb0b3f47c4efa1098d03da10ea39cb4c3bb.tar.gz
Fix:core:Make some counters unsigned to avoid UB on overflow.R6668
Diffstat (limited to 'navit/cache.c')
-rw-r--r--navit/cache.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/navit/cache.c b/navit/cache.c
index f1315cd9e..180b165c0 100644
--- a/navit/cache.c
+++ b/navit/cache.c
@@ -8,7 +8,7 @@
struct cache_entry {
int usage;
- int size;
+ unsigned int size;
struct cache_entry_list *where;
struct cache_entry *next;
struct cache_entry *prev;
@@ -24,8 +24,8 @@ struct cache {
struct cache_entry_list t1,b1,t2,b2,*insert;
int size,id_size,entry_size;
int t1_target;
- int misses;
- int hits;
+ unsigned int misses;
+ unsigned int hits;
GHashTable *hash;
};