<p>Corey Farrell has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/7284">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/84/7284/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 666c2d9..6e4451b 100644<br>--- a/res/res_fax.c<br>+++ b/res/res_fax.c<br>@@ -4563,12 +4563,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>@@ -4607,13 +4602,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/7284">change 7284</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/7284"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </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: 7284 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>