diff options
author | Igor Sysoev <igor@sysoev.ru> | 2007-01-26 01:01:23 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2007-01-26 01:01:23 +0300 |
commit | 80a29013742a69efcc459badedb59576d638ba4b (patch) | |
tree | b1a273578fac4c0099b294efb58228cf30d8d239 /src/core/ngx_times.c | |
parent | 95ec258be3e057b6accb58c01e181ed586692538 (diff) |
fix segfault if nginx was build with -O2 -fomit-frame-pointer
(at least by gcc 4.0.2 and 4.0.3)
Diffstat (limited to 'src/core/ngx_times.c')
-rw-r--r-- | src/core/ngx_times.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/ngx_times.c b/src/core/ngx_times.c index 571e4e7f0..be289dd14 100644 --- a/src/core/ngx_times.c +++ b/src/core/ngx_times.c @@ -101,7 +101,7 @@ ngx_time_update(time_t sec, ngx_uint_t msec) ngx_gmtime(sec, &gmt); - p0 = cached_http_time[slot]; + p0 = &cached_http_time[slot][0]; (void) ngx_sprintf(p0, "%s, %02d %s %4d %02d:%02d:%02d GMT", week[gmt.ngx_tm_wday], gmt.ngx_tm_mday, @@ -126,7 +126,7 @@ ngx_time_update(time_t sec, ngx_uint_t msec) #endif - p1 = cached_err_log_time[slot]; + p1 = &cached_err_log_time[slot][0]; (void) ngx_sprintf(p1, "%4d/%02d/%02d %02d:%02d:%02d", tm.ngx_tm_year, tm.ngx_tm_mon, @@ -134,7 +134,7 @@ ngx_time_update(time_t sec, ngx_uint_t msec) tm.ngx_tm_min, tm.ngx_tm_sec); - p2 = cached_http_log_time[slot]; + p2 = &cached_http_log_time[slot][0]; (void) ngx_sprintf(p2, "%02d/%s/%d:%02d:%02d:%02d %c%02d%02d", tm.ngx_tm_mday, months[tm.ngx_tm_mon - 1], |