diff options
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/ngx_conf_file.c | 2 | ||||
| -rw-r--r-- | src/core/ngx_hunk.c | 2 | ||||
| -rw-r--r-- | src/core/ngx_hunk.h | 6 | ||||
| -rw-r--r-- | src/core/ngx_output_chain.c | 3 |
4 files changed, 7 insertions, 6 deletions
diff --git a/src/core/ngx_conf_file.c b/src/core/ngx_conf_file.c index 5818636a8..60d68a06c 100644 --- a/src/core/ngx_conf_file.c +++ b/src/core/ngx_conf_file.c @@ -741,7 +741,7 @@ char *ngx_conf_set_bufs_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) } bufs->size = ngx_parse_size(&value[2]); - if (bufs->size == NGX_ERROR || bufs->size == 0) { + if (bufs->size == (size_t) NGX_ERROR || bufs->size == 0) { return "invalid value"; } diff --git a/src/core/ngx_hunk.c b/src/core/ngx_hunk.c index 3799cef78..de57a5d02 100644 --- a/src/core/ngx_hunk.c +++ b/src/core/ngx_hunk.c @@ -115,7 +115,7 @@ void ngx_chain_update_chains(ngx_chain_t **free, ngx_chain_t **busy, *out = NULL; while (*busy) { - if (ngx_hunk_size((*busy)->hunk) > 0) { + if (ngx_hunk_size((*busy)->hunk) != 0) { break; } diff --git a/src/core/ngx_hunk.h b/src/core/ngx_hunk.h index 3de78aa20..e68ba6d22 100644 --- a/src/core/ngx_hunk.h +++ b/src/core/ngx_hunk.h @@ -67,7 +67,7 @@ struct ngx_chain_s { typedef struct { int num; - ssize_t size; + size_t size; } ngx_bufs_t; @@ -117,8 +117,8 @@ typedef struct { #define ngx_hunk_size(h) \ - ((h->type & NGX_HUNK_IN_MEMORY) ? h->last - h->pos: \ - (size_t) (h->file_last - h->file_pos)) + ((h->type & NGX_HUNK_IN_MEMORY) ? (size_t) (h->last - h->pos): \ + (size_t) (h->file_last - h->file_pos)) ngx_hunk_t *ngx_create_temp_hunk(ngx_pool_t *pool, int size); diff --git a/src/core/ngx_output_chain.c b/src/core/ngx_output_chain.c index b50cf9074..69ed5bc55 100644 --- a/src/core/ngx_output_chain.c +++ b/src/core/ngx_output_chain.c @@ -16,7 +16,8 @@ static int ngx_output_chain_copy_hunk(ngx_hunk_t *dst, ngx_hunk_t *src, int ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in) { int rc, last; - ssize_t size, hsize; + size_t hsize; + ssize_t size; ngx_chain_t *cl, *out, **last_out; /* |
