<!DOCTYPE html>
<html>
<head>
</head>
<body>
<dl style="line-height: 1.5; margin-left: 2em">
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Author</dt>
<dd style="margin-left: 8.5em">Kouhei Sutou <kou****@clear*****></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Date</dt>
<dd style="margin-left: 8.5em">2015-01-17 15:41:49 +0900 (Sat, 17 Jan 2015)</dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">New Revision</dt>
<dd style="margin-left: 8.5em"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d">388e936a6942ba9b6d6d605ac13ddd709a80b81d</a></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Message</dt>
<dd style="margin-left: 8.5em"><pre style="border: 1px solid #aaa; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; padding: 0.5em; width: auto">Use incremental style loop
It's for easy to debug.</pre></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Modified files</dt>
<dd style="margin-left: 8.5em">
<ul>
<li><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#diff-0">lib/io.c</a></li>
</ul>
</dd>
</dl>
<div class="diff-section" style="clear: both">
<table style="border-collapse: collapse; border: 1px solid #aaa">
<thead>
<tr class="diff-header" style="border: 1px solid #aaa">
<td colspan="3">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre"> Modified: lib/io.c (+5 -2)</span>
<span class="diff-header-mark" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">===================================================================</span>
</pre>
</td>
</tr>
</thead>
<tbody>
<tr>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0L536">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0L537">537</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0L538">538</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0L539">539</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0L540">540</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0L541">541</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0L542">542</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0L543">543</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0L568">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0L569">569</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0L570">570</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0L571">571</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0L572">572</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0L573">573</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0L574">574</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0L575">575</a></span>
</pre>
</th>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0R536">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0R537">537</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0R538">538</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0R539">539</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0R540">540</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0R541">541</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0R542">542</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0R567">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0R568">568</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0R569">569</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0R570">570</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0R571">571</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0R572">572</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0R573">573</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0R574">574</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0R575">575</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0R576">576</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0R577">577</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/388e936a6942ba9b6d6d605ac13ddd709a80b81d#L0R578">578</a></span>
</pre>
</th>
<td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -537,7 +537,6 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">grn_rc</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> grn_io_close(grn_ctx *ctx, grn_io *io)</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> int i;</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- grn_io_mapinfo *mi;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> fileinfo *fi;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> uint32_t max_nfiles;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -569,7 +568,11 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">grn_io_close(grn_ctx *ctx, grn_io *io)</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> #endif /* WIN32 */</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> GRN_MUNMAP(&grn_gctx, &io->fis->fmo, io->header, io->base);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> if (io->fis) {</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- for (fi = io->fis, i = max_nfiles; i; fi++, i--) { grn_close(ctx, fi); }</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ int i;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ for (i = 0; i < max_nfiles; i++) {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ fileinfo *fi = &(io->fis[i]);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ grn_close(ctx, fi);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ }</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> GRN_GFREE(io->fis);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> GRN_GFREE(io);</span>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>