From: Kyle Moffett <mrmacman_g4@mac.com>
To: hzhong@cisco.com
Cc: greg@kroah.com, akpm@osdl.org, linux-kernel@vger.kernel.org,
"'Chris Wright'" <chrisw@osdl.org>,
torvalds@osdl.org
Subject: Re: Linux 2.6.11.6
Date: Fri, 25 Mar 2005 22:56:39 -0500 [thread overview]
Message-ID: <427b3b3fe43412832df380d23113357c@mac.com> (raw)
In-Reply-To: <200503260347.AXR12129@mira-sjc5-e.cisco.com>
On Mar 25, 2005, at 22:47, Hua Zhong wrote:
>> int bt_sock_unregister(int proto)
>> {
>> - if (proto >= BT_MAX_PROTO)
>> + if (proto < 0 || proto >= BT_MAX_PROTO)
>> return -EINVAL;
>
> Just curious: would it be better to say
>
> if ((unsigned int)proto >= BT_MAX_PTORO)
Erm, it _would_ work, but it's _much_ less clear, less typesafe,
and besides, GCC can probably optimize that test anyways.
Cheers,
Kyle Moffett
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCM/CS/IT/U d- s++: a18 C++++>$ UB/L/X/*++++(+)>$ P+++(++++)>$
L++++(+++) E W++(+) N+++(++) o? K? w--- O? M++ V? PS+() PE+(-) Y+
PGP+++ t+(+++) 5 X R? tv-(--) b++++(++) DI+ D+ G e->++++$ h!*()>++$ r
!y?(-)
------END GEEK CODE BLOCK------
next prev parent reply other threads:[~2005-03-26 3:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20050326024616.GM28536@shell0.pdx.osdl.net>
2005-03-26 3:39 ` Linux 2.6.11.6 Chris Wright
2005-03-26 3:41 ` Chris Wright
2005-03-26 3:47 ` Hua Zhong
2005-03-26 3:56 ` Kyle Moffett [this message]
2005-03-26 3:58 ` Chris Wright
2005-03-26 8:50 ` Moritz Muehlenhoff
2005-03-26 9:27 ` Chris Wright
2005-03-27 18:52 ` Ryan Anderson
2005-03-27 18:59 ` Dave Jones
2005-03-27 19:59 ` Chris Wright
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=427b3b3fe43412832df380d23113357c@mac.com \
--to=mrmacman_g4@mac.com \
--cc=akpm@osdl.org \
--cc=chrisw@osdl.org \
--cc=greg@kroah.com \
--cc=hzhong@cisco.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.