[Groonga-commit] groonga/groonga at 59804a1 [master] ii: exit loop as soon as possible on failure

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Aug 18 17:17:06 JST 2016


Kouhei Sutou	2016-08-18 17:17:06 +0900 (Thu, 18 Aug 2016)

  New Revision: 59804a13346b720e219ebe8eecba332298fa0d7a
  https://github.com/groonga/groonga/commit/59804a13346b720e219ebe8eecba332298fa0d7a

  Message:
    ii: exit loop as soon as possible on failure

  Modified files:
    lib/ii.c

  Modified: lib/ii.c (+3 -1)
===================================================================
--- lib/ii.c    2016-08-18 16:32:56 +0900 (c88c2e9)
+++ lib/ii.c    2016-08-18 17:17:06 +0900 (c9a8178)
@@ -3990,7 +3990,9 @@ buffer_new(grn_ctx *ctx, grn_ii *ii, int size, uint32_t *pos,
                                GRN_CURSOR_ASCENDING);
   }
   if (tc) {
-    while (lseg == NOT_ASSIGNED && (tid = grn_table_cursor_next(ctx, tc))) {
+    while (ctx->rc == GRN_SUCCESS &&
+           lseg == NOT_ASSIGNED &&
+           (tid = grn_table_cursor_next(ctx, tc))) {
       if ((a = array_at(ctx, ii, tid))) {
         for (;;) {
           uint32_t pos = a[0];
-------------- next part --------------
HTML����������������������������...
Download 



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