Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2007-01-29 14:52:25 +0300
committerIgor Sysoev <igor@sysoev.ru>2007-01-29 14:52:25 +0300
commitf51d4fea574bca8799b0e3e695fbbc8c7df914f1 (patch)
tree9ef01514f8ef0d14fda2977c520ecf5ff8827858 /src/core/ngx_times.c
parent9fc5607a7147f086a74e082c55c41961c29b9972 (diff)
fix segfault if nginx was build with -O2 -fomit-frame-pointer,
r1082 did not fix the bug the bug lived for a long time but became apparent when nginx was built with gcc 4.0.x -O2 optimization
Diffstat (limited to 'src/core/ngx_times.c')
-rw-r--r--src/core/ngx_times.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/ngx_times.c b/src/core/ngx_times.c
index be289dd14..551e10258 100644
--- a/src/core/ngx_times.c
+++ b/src/core/ngx_times.c
@@ -87,7 +87,7 @@ ngx_time_update(time_t sec, ngx_uint_t msec)
return;
}
- if (slot == NGX_TIME_SLOTS) {
+ if (slot == NGX_TIME_SLOTS - 1) {
slot = 0;
} else {
slot++;