summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-09-12 08:49:21 +0000
committerNick Mathewson <nickm@torproject.org>2005-09-12 08:49:21 +0000
commit39e29738b18dbf9950a52872579dc3564ad4d550 (patch)
treec7ad7c9d2ceff1240d5f803a7dbb3de63690ce8f
parenta6271650d5ce8581300c89fdf4bb868ff206f634 (diff)
downloadtor-39e29738b18dbf9950a52872579dc3564ad4d550.tar.gz
tor-39e29738b18dbf9950a52872579dc3564ad4d550.zip
Maybe I should pay more attention to return values and less to clever comments. Fortunately, the aforementioned comments came out against smacking upside the head.
svn:r5018
-rw-r--r--src/or/dirserv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index e055c1cc9b..1ff17150eb 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -563,12 +563,12 @@ _compare_tor_version_str_ptr(const void **_a, const void **_b)
ca = tor_version_parse(a, &va);
cb = tor_version_parse(b, &vb);
/* If they both parse, compare them. */
- if (ca && cb)
+ if (!ca && !cb)
return tor_version_compare(&va,&vb);
/* If one parses, it comes first. */
- if (ca && !cb)
- return -1;
if (!ca && cb)
+ return -1;
+ if (ca && !cb)
return 1;
/* If neiher parses, compare strings. Also, the directory server admin needs
** to be smacked upside the head. But Tor is tolerant and gentle. */