[asterisk-dev] Re: file: trunk r41694 - /trunk/main/file.c
Tony Mountifield
tony at softins.clara.co.uk
Fri Sep 1 13:27:18 MST 2006
In article <20060901164019.48A5AA9493D at abita.digium.internal>,
<svn-commits at lists.digium.com> wrote:
> Modified: trunk/main/file.c
> URL: http://svn.digium.com/view/asterisk/trunk/main/file.c?rev=41694&r1=41693&r2=41694&view=diff
> ==============================================================================
> --- trunk/main/file.c (original)
> +++ trunk/main/file.c Fri Sep 1 11:40:18 2006
> @@ -1002,7 +1002,7 @@
> }
> if (ms < 0)
> ms = 1000;
> - if (!cmdfd) {
> + if (cmdfd > -1) {
Just a trivial stylistic issue, but it always looks odd to me doing
"if (x > -1)" instead of "if (x >= 0)". And I think most instruction
sets allow a slightly more efficient test against zero than against
a specific non-zero value.
Cheers
Tony
--
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org
More information about the asterisk-dev
mailing list