]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Clearner fix for timegm assert problem.
authorNick Mathewson <nickm@torproject.org>
Sun, 1 Jan 2006 23:13:19 +0000 (23:13 +0000)
committerNick Mathewson <nickm@torproject.org>
Sun, 1 Jan 2006 23:13:19 +0000 (23:13 +0000)
svn:r5690

src/common/util.c

index 28dd3938f3fb1287bb0eec5653603e9a904a0e2e..5ef705f4fcc860fe134a55c5985ce618db1af4ca 100644 (file)
@@ -648,11 +648,8 @@ tor_timegm(struct tm *tm)
   year = tm->tm_year + 1900;
   if (year < 1970 || tm->tm_mon < 0 || tm->tm_mon > 11) {
     warn(LD_BUG, "Out-of-range argument to tor_timegm");
-    return 0;
+    return -1;
   }
-  tor_assert(year >= 1970);
-  tor_assert(tm->tm_mon >= 0);
-  tor_assert(tm->tm_mon <= 11);
   days = 365 * (year-1970) + n_leapdays(1970,year);
   for (i = 0; i < tm->tm_mon; ++i)
     days += days_per_month[i];