[Groonga-commit] groonga/groonga [master] httpd: move output initialization to outer scope

Back to archive index

null+****@clear***** null+****@clear*****
2012年 6月 22日 (金) 17:36:23 JST


Ryo Onodera	2012-06-22 17:36:23 +0900 (Fri, 22 Jun 2012)

  New Revision: 5ca3f6e90ca577dc13c0cad0ba147e10f6c4a5ed
  https://github.com/groonga/groonga/commit/5ca3f6e90ca577dc13c0cad0ba147e10f6c4a5ed

  Log:
    httpd: move output initialization to outer scope

  Modified files:
    src/nginx-module/ngx_http_groonga_module.c

  Modified: src/nginx-module/ngx_http_groonga_module.c (+4 -3)
===================================================================
--- src/nginx-module/ngx_http_groonga_module.c    2012-06-22 17:33:57 +0900 (d60aa08)
+++ src/nginx-module/ngx_http_groonga_module.c    2012-06-22 17:36:23 +0900 (1472162)
@@ -130,12 +130,13 @@ ngx_http_groonga_context_receive_handler(grn_ctx *context,
     char *result = NULL;
     unsigned int result_size = 0;
     int flags = GRN_NO_FLAGS;
+
+    ngx_http_groonga_output_t *output =
+      (ngx_http_groonga_output_t *)callback_data;
+
     grn_ctx_recv(context, &result, &result_size, &flags);
 
     if (result_size || context->rc) {
-      ngx_http_groonga_output_t *output =
-        (ngx_http_groonga_output_t *)callback_data;
-
       GRN_TEXT_INIT(&output->head, GRN_NO_FLAGS);
       GRN_TEXT_INIT(&output->body, GRN_NO_FLAGS);
       GRN_TEXT_INIT(&output->foot, GRN_NO_FLAGS);
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
Download 



Groonga-commit メーリングリストの案内
Back to archive index