<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Rich,<div><br></div><div>Thanks for submitting this patch.</div><div><br></div><div>One small thing I noticed on the Solaris buildbot:</div><div><br></div><div><pre><span class="stderr">../../drivers/bcmxcp.c: In function `setvar':
../../drivers/bcmxcp.c:1733: warning: comparison is always false due to limited range of data type
</span><span class="stdout"></span></pre><pre><span class="stderr">The code:</span></pre><pre>int setvar (const char *varname, const char *val)
{</pre><pre>[...]</pre><pre><span class="Apple-style-span" style="font-family: Helvetica; white-space: normal; "> </span><span class="Apple-style-span" style="font-family: Helvetica; white-space: normal; "><font class="Apple-style-span" face="monospace"><span class="Apple-style-span" style="white-space: pre; ">int16_t sec; /* limit the size of the timer, to avoid overflow */</span></font></span><span class="Apple-style-span" style="font-family: Helvetica; white-space: normal; "> </span></pre><pre>[...]</pre><pre> sec = atoi(val);
/* Check value:
* 0-32767 are valid values
* -1 means no Automatic off or restart
* for Auto Off Delay:
* 0-30 are valid but ill-advised */
if (sec < -1 || sec > 0x7FFF) {
return STAT_SET_INVALID;
}
</pre></div><div><br></div><div>I think the value of atoi() should probably be assigned to a larger int variable, and leave the conditional there to guard against out-of-range values.</div></body></html>