diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2002-12-17 15:48:27 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2002-12-17 15:48:27 +0000 |
| commit | 5518aba253096193df31b0f64e7461d1ac224dfd (patch) | |
| tree | e06f1dc62410b999ab561ca07742af1fef34dc79 /src/http | |
| parent | 5eef618ed671c55bc1244652cb49afef224c833c (diff) | |
| download | nginx-5518aba253096193df31b0f64e7461d1ac224dfd.tar.gz nginx-5518aba253096193df31b0f64e7461d1ac224dfd.tar.bz2 | |
nginx-0.0.1-2002-12-17-18:48:27 import
Diffstat (limited to '')
| -rw-r--r-- | src/http/modules/ngx_http_index_handler.c | 2 | ||||
| -rw-r--r-- | src/http/ngx_http_event.c | 10 | ||||
| -rw-r--r-- | src/http/ngx_http_parse_time.c | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/http/modules/ngx_http_index_handler.c b/src/http/modules/ngx_http_index_handler.c index 194879503..db3e3ccfe 100644 --- a/src/http/modules/ngx_http_index_handler.c +++ b/src/http/modules/ngx_http_index_handler.c @@ -19,7 +19,7 @@ static char *ngx_http_index_set_index(ngx_pool_t *p, void *conf, static ngx_command_t ngx_http_index_commands[] = { - {"index", ngx_http_index_set_index, NULL, + {"index", ngx_http_index_set_index, 0, NGX_HTTP_LOC_CONF, NGX_CONF_ITERATE, "set index files"}, diff --git a/src/http/ngx_http_event.c b/src/http/ngx_http_event.c index cbea0c682..60b3ca416 100644 --- a/src/http/ngx_http_event.c +++ b/src/http/ngx_http_event.c @@ -104,11 +104,11 @@ int ngx_http_init_connection(ngx_connection_t *c) ngx_test_null(c->addr_text.data, ngx_palloc(c->pool, c->addr_text.len), NGX_ERROR); - ngx_test_null(c->addr_text.len, - ngx_inet_ntop(c->family, - (char *)c->sockaddr + c->addr, - c->addr_text.data, c->addr_text.len), - NGX_ERROR); + c->addr_text.len = ngx_inet_ntop(c->family, + (char *)c->sockaddr + c->addr, + c->addr_text.data, c->addr_text.len); + if (c->addr_text.len = 0) + return NGX_ERROR; ngx_test_null(ctx, ngx_pcalloc(c->pool, sizeof(ngx_http_log_ctx_t)), NGX_ERROR); diff --git a/src/http/ngx_http_parse_time.c b/src/http/ngx_http_parse_time.c index 199a7f9f0..9c606c26e 100644 --- a/src/http/ngx_http_parse_time.c +++ b/src/http/ngx_http_parse_time.c @@ -207,7 +207,7 @@ time_t ngx_http_parse_time(char *value, size_t len) month += 12; year -= 1; } - /* Gauss's formula for days from 1 March 1 BC */ + /* Gauss's formula for Grigorian days from 1 March 1 BC */ return (365 * year + year / 4 - year / 100 + year / 400 + 367 * month / 12 + day - 31 /* 719527 days are between 1 March 1 BC and 1 March 1970, |
