<p>Corey Farrell has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/7282">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_fax: Remove checks for unsigned values being >= 0.<br><br>It's impossible for gwtimeout or fdtimeout to be less than 0 because<br>they are unsigned int's. Remove checks and unreachable branches.<br><br>Change-Id: Ib2286960621e6ee245e40013c84986143302bc78<br>---<br>M res/res_fax.c<br>1 file changed, 2 insertions(+), 13 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/82/7282/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/res/res_fax.c b/res/res_fax.c<br>index b25b6d1..4a1c084 100644<br>--- a/res/res_fax.c<br>+++ b/res/res_fax.c<br>@@ -4561,12 +4561,7 @@<br> unsigned int gwtimeout;<br> <br> if (sscanf(timeout, "%30u", &gwtimeout) == 1) {<br>- if (gwtimeout >= 0) {<br>- details->gateway_timeout = gwtimeout * 1000;<br>- } else {<br>- ast_log(LOG_WARNING, "%s(%s) timeout cannot be negative. Ignoring timeout\n",<br>- cmd, data);<br>- }<br>+ details->gateway_timeout = gwtimeout * 1000;<br> } else {<br> ast_log(LOG_WARNING, "Unsupported timeout '%s' passed to FAXOPT(%s).\n", timeout, data);<br> }<br>@@ -4605,13 +4600,7 @@<br> if (details->faxdetect_id < 0) {<br> if (timeout) {<br> if (sscanf(timeout, "%30u", &fdtimeout) == 1) {<br>- if (fdtimeout >= 0) {<br>- fdtimeout *= 1000;<br>- } else {<br>- ast_log(LOG_WARNING, "%s(%s) timeout cannot be negative. Ignoring timeout\n",<br>- cmd, data);<br>- fdtimeout = 0;<br>- }<br>+ fdtimeout *= 1000;<br> } else {<br> ast_log(LOG_WARNING, "Unsupported timeout '%s' passed to FAXOPT(%s).\n",<br> timeout, data);<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7282">change 7282</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/7282"/><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: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ib2286960621e6ee245e40013c84986143302bc78 </div>
<div style="display:none"> Gerrit-Change-Number: 7282 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>