]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Belt *or* suspenders will be sufficient when casting things to unsigned char.
authorNick Mathewson <nickm@torproject.org>
Wed, 8 Dec 2004 07:20:21 +0000 (07:20 +0000)
committerNick Mathewson <nickm@torproject.org>
Wed, 8 Dec 2004 07:20:21 +0000 (07:20 +0000)
svn:r3122

src/common/crypto.c

index eaf438e83588fde22844df9626c4d58a279bd43f..66a666e943212ebcc4cb1b041a61d5954dfb8be9 100644 (file)
@@ -974,12 +974,11 @@ int
 crypto_pk_check_fingerprint_syntax(const char *s)
 {
   int i;
-  const unsigned char *cp = s;
   for (i = 0; i < FINGERPRINT_LEN; ++i) {
     if ((i%5) == 4) {
-      if (!TOR_ISSPACE(cp[i])) return 0;
+      if (!TOR_ISSPACE(s[i])) return 0;
     } else {
-      if (!TOR_ISXDIGIT(cp[i])) return 0;
+      if (!TOR_ISXDIGIT(s[i])) return 0;
     }
   }
   if (s[FINGERPRINT_LEN]) return 0;