evp_test.c: avoid warning from having a pointer difference returned as int
authorRichard Levitte <levitte@openssl.org>
Wed, 3 Aug 2016 19:18:55 +0000 (21:18 +0200)
committerRichard Levitte <levitte@openssl.org>
Fri, 19 Aug 2016 12:41:07 +0000 (14:41 +0200)
Reviewed-by: Rich Salz <rsalz@openssl.org>
crypto/evp/evp_test.c [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index d7441ec..9879642
@@ -76,6 +76,7 @@ static void hexdump(FILE *f, const char *title, const unsigned char *s, int l)
 static int convert(unsigned char *s)
 {
     unsigned char *d;
+    int digits = 0;
 
     for (d = s; *s; s += 2, ++d) {
         unsigned int n;
@@ -86,8 +87,9 @@ static int convert(unsigned char *s)
         }
         sscanf((char *)s, "%2x", &n);
         *d = (unsigned char)n;
+        digits++;
     }
-    return s - d;
+    return digits;
 }
 
 static char *sstrsep(char **string, const char *delim)