[Groonga-commit] groonga/groonga at 1e4044f [master] ii: put small code to if clause

Back to archive index
Kouhei Sutou null+****@clear*****
Fri Feb 15 10:32:00 JST 2019


Kouhei Sutou	2019-02-15 10:32:00 +0900 (Fri, 15 Feb 2019)

  Revision: 1e4044f1b0adc1e3fd57d69274da881b65eeef34
  https://github.com/groonga/groonga/commit/1e4044f1b0adc1e3fd57d69274da881b65eeef34

  Message:
    ii: put small code to if clause

  Modified files:
    lib/ii.c

  Modified: lib/ii.c (+3 -3)
===================================================================
--- lib/ii.c    2019-02-15 10:25:58 +0900 (b719f3e7a)
+++ lib/ii.c    2019-02-15 10:32:00 +0900 (76638a64e)
@@ -3353,7 +3353,9 @@ grn_inline static void
 merger_get_next_buffer(grn_ctx *ctx, merger_data *data)
 {
   merger_buffer_data *buffer_data = &(data->source.buffer);
-  if (buffer_data->next_position > 0) {
+  if (buffer_data->next_position == 0) {
+    buffer_data->id.rid = 0;
+  } else {
     docinfo last_id = {
       buffer_data->id.rid,
       buffer_data->id.sid
@@ -3378,8 +3380,6 @@ merger_get_next_buffer(grn_ctx *ctx, merger_data *data)
       return;
     }
     buffer_data->next_position = record->step;
-  } else {
-    buffer_data->id.rid = 0;
   }
 }
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20190215/458b2be8/attachment.html>


More information about the Groonga-commit mailing list
Back to archive index