<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 12, 2013 at 5:12 AM, Alexey Samsonov <span dir="ltr"><<a href="mailto:samsonov@google.com" target="_blank" class="cremed">samsonov@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>Here's what I get from "man readdir_r":</div>
<div><br></div><div>It reads the next directory entry from the directory stream dirp, and returns it in the caller-allocated buffer pointed <span class="">to</span> by entry.<br>
</div><div>So this _looks like_ we may assume that *entry is indeed overwritten in the original function.</div><div>That said, I'm ok with the changes you've made.</div></blockquote></div></div><br>Heh, the POSIX spec makes things more clear: "Upon successful return, the pointer returned at *result shall have the same value as the argument entry. Upon reaching the end of the directory stream, this pointer shall have the value NULL."<br>
<br>However, I still mildly prefer referencing *result...<br></div>