projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
411bebd
)
Remove comparison of unsigned value < 0.
author
Ben Pfaff
<blp@nicira.com>
Thu, 8 Jan 2009 23:25:24 +0000
(15:25 -0800)
committer
Ben Pfaff
<blp@nicira.com>
Thu, 8 Jan 2009 23:25:24 +0000
(15:25 -0800)
Found by -Wextra.
lib/dhcp-client.c
patch
|
blob
|
history
diff --git
a/lib/dhcp-client.c
b/lib/dhcp-client.c
index 77d381902e7726a4e9bfe19effc4acfe00299db4..d12ac3d4bb0b24ec4208e895ea1c2e77206ad7b0 100644
(file)
--- a/
lib/dhcp-client.c
+++ b/
lib/dhcp-client.c
@@
-573,7
+573,7
@@
static bool
dhcp_receive(struct dhclient *cli, unsigned int msgs, struct dhcp_msg *msg)
{
while (do_receive_msg(cli, msg)) {
- if (msg->type
< 0 || msg->type
> 31 || !((1u << msg->type) & msgs)) {
+ if (msg->type > 31 || !((1u << msg->type) & msgs)) {
VLOG_DBG_RL(&rl, "received unexpected %s in %s state: %s",
dhcp_type_name(msg->type), state_name(cli->state),
dhcp_msg_to_string(msg, false, &cli->s));