aboutsummaryrefslogtreecommitdiffstats
path: root/libasn1common
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2017-11-06 02:08:47 -0800
committerLev Walkin <vlm@lionet.info>2017-11-06 02:08:47 -0800
commit08661a6508d87d775167d24058d4b6faa957f410 (patch)
treece5143bf55bec39509b06b632b16ac1229c4aa4e /libasn1common
parent1fc5edb22d1bc5dea70e389422c5cf3e46b1d1ab (diff)
use ptrdiff_t
Diffstat (limited to 'libasn1common')
-rw-r--r--libasn1common/genhash.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libasn1common/genhash.c b/libasn1common/genhash.c
index 275e23e2..5a6d3e41 100644
--- a/libasn1common/genhash.c
+++ b/libasn1common/genhash.c
@@ -58,6 +58,7 @@
#include <stdlib.h>
#include <string.h>
#include <assert.h>
+#include <stddef.h>
#include <errno.h>
#include "genhash.h"
@@ -767,7 +768,7 @@ genhash_empty(genhash_t *h, int freekeys, int freevalues) {
unsigned int
hashf_int (const void *key) {
- return (*(const int *)key ^ (*(const int *)key >> 16));
+ return (*(const ptrdiff_t *)key ^ (*(const ptrdiff_t *)key >> 16));
}
int
@@ -777,7 +778,7 @@ cmpf_int (const void *key1, const void *key2) {
unsigned int
hashf_void (const void *key) {
- return ((int)key ^ ((int)key >> 16));
+ return ((ptrdiff_t)key ^ ((ptrdiff_t)key >> 16));
}
int