mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 12:23:32 +01:00
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
This commit is contained in:
parent
a6271650d5
commit
39e29738b1
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user