[Groonga-commit] groonga/groonga [master] Remove unused variable: i

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Oct 16 15:22:25 JST 2012


Kouhei Sutou	2012-10-16 15:22:25 +0900 (Tue, 16 Oct 2012)

  New Revision: a5f1623ac41a63a3cc5cdc839f8017f8f5ecc3a5
  https://github.com/groonga/groonga/commit/a5f1623ac41a63a3cc5cdc839f8017f8f5ecc3a5

  Log:
    Remove unused variable: i

  Modified files:
    lib/output.c

  Modified: lib/output.c (+4 -4)
===================================================================
--- lib/output.c    2012-10-16 15:20:50 +0900 (0f2e753)
+++ lib/output.c    2012-10-16 15:22:25 +0900 (fd63da9)
@@ -1018,13 +1018,13 @@ grn_output_table_records(grn_ctx *ctx, grn_obj *outbuf,
                                                format->offset, format->limit,
                                                GRN_CURSOR_ASCENDING);
   if (tc) {
-    int i, j;
+    int i;
     grn_obj id;
     GRN_TEXT_INIT(&id, 0);
-    for (i = 0; !grn_table_cursor_next_o(ctx, tc, &id); i++) {
+    while (!grn_table_cursor_next_o(ctx, tc, &id)) {
       grn_output_array_open(ctx, outbuf, output_type, "HIT", ncolumns);
-      for (j = 0; j < ncolumns; j++) {
-        grn_text_atoj_o(ctx, outbuf, output_type, columns[j], &id);
+      for (i = 0; i < ncolumns; i++) {
+        grn_text_atoj_o(ctx, outbuf, output_type, columns[i], &id);
       }
       grn_output_array_close(ctx, outbuf, output_type);
     }
-------------- next part --------------
HTML����������������������������...
Download 



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