From e48838559b0392dcedcf4ceab80cdc65b942741d Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Thu, 18 Apr 2013 16:45:23 +0200 Subject: [PATCH] der_encode_setof: fix compiler warning when compiling for windows 64bit --- src/pk/asn1/der/set/der_encode_setof.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pk/asn1/der/set/der_encode_setof.c b/src/pk/asn1/der/set/der_encode_setof.c index 938a309..022aca3 100644 --- a/src/pk/asn1/der/set/der_encode_setof.c +++ b/src/pk/asn1/der/set/der_encode_setof.c @@ -61,7 +61,8 @@ static int qsort_helper(const void *a, const void *b) int der_encode_setof(ltc_asn1_list *list, unsigned long inlen, unsigned char *out, unsigned long *outlen) { - unsigned long x, y, z, hdrlen; + unsigned long x, y, z; + ptrdiff_t hdrlen; int err; struct edge *edges; unsigned char *ptr, *buf; @@ -102,7 +103,7 @@ int der_encode_setof(ltc_asn1_list *list, unsigned long inlen, } /* get the size of the static header */ - hdrlen = ((unsigned long)ptr) - ((unsigned long)buf); + hdrlen = ptr - buf; /* scan for edges */