<p>Kevin Harwell <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/5995">View Change</a></p><p>Patch set 1:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #d4ffd4;">Code-Review +1</span></p><p>(1 comment)</p><ul style="list-style: none; padding-left: 20px;"><li><p><a href="https://gerrit.asterisk.org/#/c/5995/1/res/res_musiconhold.c">File res/res_musiconhold.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/5995/1/res/res_musiconhold.c@575">Patch Set #1, Line 575:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">struct dirent *de;<br>              DIR *dir = opendir(class->dir);<br><br>          if (!dir) {<br>                   ast_log(LOG_WARNING, "Cannot access '%s': %s\n", class->dir, strerror(errno));<br>                   return -1;<br>            }<br><br>           while ((de = readdir(dir)) && (files < MAX_FILE_COUNT)) {<br>                  if (strlen(de->d_name) > 3 &&<br>                       (ast_ends_with(de->d_name, ".raw") ||<br>                                 ast_ends_with(de->d_name, ".sln") ||<br>                             ast_ends_with(de->d_name, ".mp3"))) {<br></pre></blockquote></p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">In moh_scan_files we are still using opendir/readdir/closedir.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">Since the code here was already changing it seemed like an easy thing to do to improve the code. That being said the code has worked that way for a long time without complaints (that I know of), so I'll leave to your discretion. Certainly nothing that needs to hold up the review.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/5995">change 5995</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/5995"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I865fbee781c36f9cf9f6b5076f95f60b34fa7d64 </div>
<div style="display:none"> Gerrit-Change-Number: 5995 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Fri, 14 Jul 2017 18:42:24 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>