[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] Maybe I should pay more attention to return values and less...



Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv20790/src/or

Modified Files:
	dirserv.c 
Log Message:
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.

Index: dirserv.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/dirserv.c,v
retrieving revision 1.223
retrieving revision 1.224
diff -u -d -r1.223 -r1.224
--- dirserv.c	12 Sep 2005 08:46:37 -0000	1.223
+++ dirserv.c	12 Sep 2005 08:49:21 -0000	1.224
@@ -563,12 +563,12 @@
   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. */