summaryrefslogtreecommitdiff
blob: 2de3ba344578c56cf8fe7d6607020b4a0bc21299 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--- a/pr/src/misc/prtime.c
+++ b/pr/src/misc/prtime.c
@@ -1536,7 +1536,7 @@
                 case TT_EET: zone_offset =  2 * 60; break;
                 case TT_JST: zone_offset =  9 * 60; break;
                 default:
-                  PR_ASSERT (0);
+                  return PR_FAILURE;
                   break;
                 }
         }
@@ -1578,11 +1578,12 @@
           struct tm localTime;
           time_t secs;
 
-          PR_ASSERT(result->tm_month > -1 &&
+          if (!(result->tm_month > -1 &&
                     result->tm_mday > 0 &&
                     result->tm_hour > -1 &&
                     result->tm_min > -1 &&
-                    result->tm_sec > -1);
+                    result->tm_sec > -1))
+		    return PR_FAILURE;
 
             /*
              * To obtain time_t from a tm structure representing the local