[nginx] Style: use specified macro instead of magic-number.

Maxim Dounin mdounin at mdounin.ru
Wed Aug 6 16:20:31 UTC 2014


details:   http://hg.nginx.org/nginx/rev/ab48149b77a6
branches:  
changeset: 5801:ab48149b77a6
user:      Tatsuhiko Kubo <cubicdaiya at gmail.com>
date:      Wed Aug 06 23:58:44 2014 +0900
description:
Style: use specified macro instead of magic-number.

diffstat:

 src/http/modules/ngx_http_memcached_module.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff --git a/src/http/modules/ngx_http_memcached_module.c b/src/http/modules/ngx_http_memcached_module.c
--- a/src/http/modules/ngx_http_memcached_module.c
+++ b/src/http/modules/ngx_http_memcached_module.c
@@ -391,7 +391,7 @@ found:
         p = line.data + line.len;
 
         u->headers_in.content_length_n = ngx_atoof(start, p - start);
-        if (u->headers_in.content_length_n == -1) {
+        if (u->headers_in.content_length_n == NGX_ERROR) {
             ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
                           "memcached sent invalid length in response \"%V\" "
                           "for key \"%V\"",



More information about the nginx-devel mailing list