<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 2/20/19 6:59 PM, Paul Gofman wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:1bc911c6-312e-9bdb-ea7a-4e6ce8bf01a0@gmail.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <p>Hello Jacek,</p>
      <p>    thanks for the review.<br>
      </p>
      <blockquote type="cite"
        cite="mid:0ce4d4f4-fa40-dac7-271e-7041a8397223@codeweavers.com">
        <div class="moz-cite-prefix"><br>
        </div>
        <div class="moz-cite-prefix">On 2/20/19 6:33 PM, Paul Gofman
          wrote:<br>
        </div>
        <blockquote type="cite"
          cite="mid:20190220173357.8329-3-gofmanp@gmail.com">
          <div class="moz-text-plain" wrap="true" graphical-quote="true"
            style="font-family: -moz-fixed; font-size: 12px;"
            lang="x-unicode">
            <pre class="moz-quote-pre" wrap=""> -    if (send_completion) NTDLL_AddCompletion( hFile, cvalue, status, total );
-    if (async_read && (options & FILE_NO_INTERMEDIATE_BUFFERING) && status == STATUS_SUCCESS)
-        return STATUS_PENDING;
-    return status;
+    ret_status = async_read && (options & FILE_NO_INTERMEDIATE_BUFFERING) && status == STATUS_SUCCESS
+            ? STATUS_PENDING : status;
+
+    if (send_completion) NTDLL_AddCompletion( hFile, cvalue, status, total, ret_status == STATUS_PENDING );
+    return ret_status;
 }</pre>
          </div>
        </blockquote>
        <p><br>
        </p>
        <p>Do you really need a separated ret_status variable? It seems
          that you could just set status to STATUS_PENDING instead.<br>
        </p>
        <p><br>
        </p>
      </blockquote>
      <p>This way I will be passing STATUS_PENDING instead of
        STATUS_SUCCESS to NTDLL_AddCompletion() status parameter. This
        looks like a separate change which I tried to avoid. Or do you
        think it is ok to do that?<br>
      </p>
    </blockquote>
    <p><br>
    </p>
    <p>Right, I missed that. Separate variable is fine then.</p>
    <p><br>
    </p>
    <p>Thanks,</p>
    <p>Jacek<br>
    </p>
  </body>
</html>