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

Tatsuhiko Kubo cubicdaiya at gmail.com
Wed Aug 6 15:02:38 UTC 2014


# HG changeset patch
# User Tatsuhiko Kubo <cubicdaiya at gmail.com>
# Date 1407337124 -32400
#      Wed Aug 06 23:58:44 2014 +0900
# Node ID 16acd71658e33e4989104a3456bba73e64de5aaa
# Parent  0570e42ffeed428338b7dd528f63b37d6d552a24
Style: use specified macro instead of magic-number.

diff -r 0570e42ffeed -r 16acd71658e3 src/http/modules/ngx_http_memcached_module.c
--- a/src/http/modules/ngx_http_memcached_module.c	Thu Jun 19 04:16:36 2014 -0700
+++ b/src/http/modules/ngx_http_memcached_module.c	Wed Aug 06 23:58:44 2014 +0900
@@ -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