<!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 &lt;kou****@clear*****&gt;</dd>
      <dt style="clear: both; float: left; font-weight: bold; width: 8em">Date</dt>
      <dd style="margin-left: 8.5em">2015-01-16 14:44:07 +0900 (Fri, 16 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/6cc7473554b954b8dcda54c3bcc3bba6d1855d34">6cc7473554b954b8dcda54c3bcc3bba6d1855d34</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, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; padding: 0.5em; width: auto">io: share common code to compute base address</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/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#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, &quot;Liberation Mono&quot;, 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 (+4 -9)</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, &quot;Liberation Mono&quot;, 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/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L108">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L109">109</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L110">110</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L111">111</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/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L112">112</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L113">113</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/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L114">114</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/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L115">115</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L116">116</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L117">117</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L118">118</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L193">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L194">194</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L195">195</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L196">196</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/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L197">197</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L198">198</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L199">199</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L200">200</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L201">201</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L202">202</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/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L203">203</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/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L204">204</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L205">205</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L206">206</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L207">207</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L427">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L428">428</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L429">429</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L430">430</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/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L431">431</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L432">432</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L433">433</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L434">434</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L449">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L450">450</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L451">451</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L452">452</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/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L453">453</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/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L454">454</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L455">455</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L456">456</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0L457">457</a></span>
</pre>
            </th>
            <th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, 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/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R108">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R109">109</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R110">110</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R111">111</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R112">112</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</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/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R113">113</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R114">114</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R115">115</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R116">116</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R191">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R192">192</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R193">193</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R194">194</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</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/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R195">195</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R196">196</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R197">197</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R198">198</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R199">199</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R200">200</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</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/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R201">201</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R202">202</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R203">203</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R204">204</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R424">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R425">425</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R426">426</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R427">427</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R428">428</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R429">429</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R430">430</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R445">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R446">446</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R447">447</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R448">448</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</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/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R449">449</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R450">450</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R451">451</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/6cc7473554b954b8dcda54c3bcc3bba6d1855d34#L0R452">452</a></span>
</pre>
            </th>
            <td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, 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">@@ -109,10 +109,8 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">grn_io_create_tmp(uint32_t header_size, uint32_t segment_size,</span></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_io *io;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   uint32_t b;</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">-  uint32_t total_header_size;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   struct _grn_io_header *header;</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">-  total_header_size = IO_HEADER_SIZE + header_size;</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">-  b = (total_header_size + grn_pagesize - 1) &amp; ~(grn_pagesize - 1);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+  b = grn_io_compute_base(header_size);</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   if ((header = (struct _grn_io_header *)GRN_MMAP(&amp;grn_gctx, NULL, NULL, 0, b))) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     header-&gt;header_size = header_size;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     header-&gt;segment_size = segment_size;</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -194,14 +192,13 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">grn_io_create(grn_ctx *ctx, const char *path, uint32_t header_size, uint32_t seg</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre">   grn_io *io;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   fileinfo *fis;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   uint32_t b, max_nfiles;</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">-  uint32_t bs, total_header_size;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+  uint32_t bs;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   struct _grn_io_header *header;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   if (!path) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     return grn_io_create_tmp(header_size, segment_size, max_segment, mode, flags);</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   }</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   if (!*path || (strlen(path) &gt; PATH_MAX - 4)) { return NULL; }</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">-  total_header_size = IO_HEADER_SIZE + header_size;</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">-  b = (total_header_size + grn_pagesize - 1) &amp; ~(grn_pagesize - 1);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+  b = grn_io_compute_base(header_size);</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   bs = (b + segment_size - 1) / segment_size;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   max_nfiles = (unsigned int)(</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     ((uint64_t)segment_size * (max_segment + bs) + GRN_IO_FILE_SIZE - 1)</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -428,7 +425,6 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">grn_io_open(grn_ctx *ctx, const char *path, grn_io_mode mode)</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre">   fileinfo *fis;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   uint32_t flags = 0;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   uint32_t b, max_nfiles;</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">-  uint32_t total_header_size;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   uint32_t header_size = 0, segment_size = 0, max_segment = 0, bs;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   if (!path || !*path || (strlen(path) &gt; PATH_MAX - 4)) { return NULL; }</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">@@ -450,8 +446,7 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">grn_io_open(grn_ctx *ctx, const char *path, grn_io_mode mode)</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre">     GRN_CLOSE(fd);</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     if (!segment_size) { return NULL; }</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   }</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">-  total_header_size = IO_HEADER_SIZE + header_size;</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">-  b = (total_header_size + grn_pagesize - 1) &amp; ~(grn_pagesize - 1);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+  b = grn_io_compute_base(header_size);</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   bs = (b + segment_size - 1) / segment_size;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   max_nfiles = (unsigned int)(</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     ((uint64_t)segment_size * (max_segment + bs) + GRN_IO_FILE_SIZE - 1)</span>
</pre>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
  </body>
</html>