[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] fix some bool logic
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or
Modified Files:
connection_or.c
Log Message:
fix some bool logic
Index: connection_or.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection_or.c,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -d -r1.119 -r1.120
--- connection_or.c 21 Jul 2004 02:25:14 -0000 1.119
+++ connection_or.c 21 Jul 2004 02:42:49 -0000 1.120
@@ -245,7 +245,7 @@
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 @@
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,