null+****@clear*****
null+****@clear*****
2012年 6月 26日 (火) 15:43:30 JST
Ryo Onodera 2012-06-26 15:43:30 +0900 (Tue, 26 Jun 2012) New Revision: 18e5927c853c62c934d69bf6c3cfaad5422431dd https://github.com/groonga/groonga/commit/18e5927c853c62c934d69bf6c3cfaad5422431dd Log: httpd: don't use short-hand conditional expressions Modified files: src/nginx-module/ngx_http_groonga_module.c Modified: src/nginx-module/ngx_http_groonga_module.c (+6 -4) =================================================================== --- src/nginx-module/ngx_http_groonga_module.c 2012-06-26 15:16:05 +0900 (de446d0) +++ src/nginx-module/ngx_http_groonga_module.c 2012-06-26 15:43:30 +0900 (dca8455) @@ -164,8 +164,10 @@ ngx_http_groonga_context_receive_handler(grn_ctx *context, } } - if (result_size || GRN_TEXT_LEN(&output->body) || context->rc) { - if (!GRN_TEXT_LEN(&output->body)) { + if (result_size > 0 || + GRN_TEXT_LEN(&output->body) > 0 || + context->rc != GRN_SUCCESS) { + if (GRN_TEXT_LEN(&output->body) == 0) { GRN_TEXT_SET(context, &output->body, result, @@ -349,7 +351,7 @@ ngx_http_groonga_init_module(ngx_cycle_t *cycle) grn_rc rc; rc = grn_init(); - if (rc) { + if (rc != GRN_SUCCESS) { return NGX_ERROR; } @@ -362,7 +364,7 @@ ngx_http_groonga_exit_master(ngx_cycle_t *cycle) grn_rc rc; rc = grn_fin(); - if (rc) { + if (rc != GRN_SUCCESS) { /* there is nothing we can at this situation... */ } -------------- next part -------------- HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...Download