Ticket #1368: patch-src_core_ngx__times.c

File patch-src_core_ngx__times.c, 349 bytes (added by Jamie Landeg-Jones, 9 years ago)
Line 
1--- src/core/ngx_times.c.orig 2017-07-11 14:24:07.000000000 +0100
2+++ src/core/ngx_times.c 2017-08-28 02:01:46.437347000 +0100
3@@ -304,7 +304,11 @@
4
5 /* the calculation is valid for positive time_t only */
6
7- n = (ngx_uint_t) t;
8+ if (t < 0) {
9+ n = 0;
10+ } else {
11+ n = (ngx_uint_t) t;
12+ }
13
14 days = n / 86400;
15