]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix a logic error in 4282 fixes
authorNick Mathewson <nickm@torproject.org>
Fri, 24 May 2013 17:36:15 +0000 (13:36 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 24 May 2013 17:36:15 +0000 (13:36 -0400)
check_or_create_data_subdir has succeeded when it returns 0, not
when it returns negative.

src/or/geoip.c

index 73ad2118814df359f92ac71974af044ee60cf329..1c307dcc575c58069b3d65a036cc2052403f0ede 100644 (file)
@@ -1146,7 +1146,7 @@ geoip_dirreq_stats_write(time_t now)
   str = geoip_format_dirreq_stats(now);
 
   /* Write dirreq-stats string to disk. */
-  if (check_or_create_data_subdir("stats") < 0) {
+  if (!check_or_create_data_subdir("stats")) {
     write_to_data_subdir("stats", "dirreq-stats", str, "dirreq statistics");
     /* Reset measurement interval start. */
     geoip_reset_dirreq_stats(now);