[Groonga-commit] groonga/groonga at 0d39cfb [master] select: remove needless check

Zurück zum Archiv-Index

Kouhei Sutou null+****@clear*****
Fri May 20 17:41:53 JST 2016


Kouhei Sutou	2016-05-20 17:41:53 +0900 (Fri, 20 May 2016)

  New Revision: 0d39cfb7f5dda0651bbc99ea40d4c58cec561abb
  https://github.com/groonga/groonga/commit/0d39cfb7f5dda0651bbc99ea40d4c58cec561abb

  Message:
    select: remove needless check

  Modified files:
    lib/proc/proc_select.c

  Modified: lib/proc/proc_select.c (+3 -9)
===================================================================
--- lib/proc/proc_select.c    2016-05-20 17:36:42 +0900 (b0fdb7c)
+++ lib/proc/proc_select.c    2016-05-20 17:41:53 +0900 (cbc248e)
@@ -2104,15 +2104,11 @@ grn_select(grn_ctx *ctx, grn_select_data *data)
       goto exit;
     }
 
-    if (data->tables.result) {
-      nhits = grn_table_size(ctx, data->tables.result);
-    } else {
-      nhits = 0;
-    }
+    nhits = grn_table_size(ctx, data->tables.result);
     GRN_QUERY_LOG(ctx, GRN_QUERY_LOG_SIZE,
                   ":", "select(%d)", nhits);
 
-    if (data->tables.result && data->columns.filtered) {
+    if (data->columns.filtered) {
       if (data->tables.result == data->tables.initial) {
         grn_posting posting;
 
@@ -2135,7 +2131,7 @@ grn_select(grn_ctx *ctx, grn_select_data *data)
                                data->columns.filtered);
     }
 
-    if (data->tables.result) {
+    {
       uint32_t ngkeys;
       grn_table_sort_key *gkeys = NULL;
       int result_size = 1;
@@ -2282,8 +2278,6 @@ grn_select(grn_ctx *ctx, grn_select_data *data)
       if (gkeys) {
         grn_table_sort_key_close(ctx, gkeys, ngkeys);
       }
-    } else {
-      GRN_OUTPUT_ARRAY_OPEN("RESULT", 0);
     }
     GRN_OUTPUT_ARRAY_CLOSE();
     if (!ctx->rc &&
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Zurück zum Archiv-Index