aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-12-08 07:20:21 +0000
committerNick Mathewson <nickm@torproject.org>2004-12-08 07:20:21 +0000
commitfd4c624677cbf19ee01817195ada507752ae8f80 (patch)
treee45e15c1cc872bf3eef6c333c924da118daafff3
parent524a8bdc70c751e5256b00444690a05f316c5c82 (diff)
downloadtor-fd4c624677cbf19ee01817195ada507752ae8f80.tar
tor-fd4c624677cbf19ee01817195ada507752ae8f80.tar.gz
Belt *or* suspenders will be sufficient when casting things to unsigned char.
svn:r3122
-rw-r--r--src/common/crypto.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c
index eaf438e83..66a666e94 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -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;