aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-07-21 02:42:49 +0000
committerRoger Dingledine <arma@torproject.org>2004-07-21 02:42:49 +0000
commit84b8f8e04ab23e97976d8a292b83d299010dcfdf (patch)
tree6dafbe5ef8f6dbff8d417b5bab3146b8212f12d2 /src
parente547ab293b291933128419682ad3dcb537e67df5 (diff)
downloadtor-84b8f8e04ab23e97976d8a292b83d299010dcfdf.tar
tor-84b8f8e04ab23e97976d8a292b83d299010dcfdf.tar.gz
fix some bool logic
svn:r2075
Diffstat (limited to 'src')
-rw-r--r--src/or/connection_or.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index 6960afd99..bf9975d95 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -245,7 +245,7 @@ int connection_tls_continue_handshake(connection_t *conn) {
return 0;
}
-static int digest_is_nonzero(const char *id) {
+static int digest_is_zero(const char *id) {
char ZERO_DIGEST[DIGEST_LEN];
memset(ZERO_DIGEST, 0, DIGEST_LEN);
return !memcmp(ZERO_DIGEST, id, DIGEST_LEN);
@@ -315,7 +315,7 @@ connection_tls_finish_handshake(connection_t *conn) {
return -1;
}
- if (digest_is_nonzero(conn->identity_digest)) {
+ if (!digest_is_zero(conn->identity_digest)) {
/* I initiated this connection. */
if (strcasecmp(conn->nickname, nickname)) {
log_fn(options.DirPort ? LOG_WARN : LOG_INFO,