projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4528f88
)
Remove unnecessary check for validity when dereferencing an array.
author
Justin Pettit
<jpettit@nicira.com>
Tue, 14 Oct 2008 06:45:29 +0000
(23:45 -0700)
committer
Justin Pettit
<jpettit@nicira.com>
Tue, 14 Oct 2008 06:45:29 +0000
(23:45 -0700)
Thanks to Masa et al. for pointing this out.
switch/datapath.c
patch
|
blob
|
history
diff --git
a/switch/datapath.c
b/switch/datapath.c
index 9ec768d62f896a98dd45ccbd16755b4bb96d690a..4321f94fddb27cd71b9f3327e3f4ea4e3a0e82cb 100644
(file)
--- a/
switch/datapath.c
+++ b/
switch/datapath.c
@@
-686,7
+686,7
@@
dp_update_port_flags(struct datapath *dp, const struct ofp_port_mod *opm)
struct sw_port *p = &dp->ports[port_no];
/* Make sure the port id hasn't changed since this was sent */
- if (
!p ||
memcmp(opm->hw_addr, netdev_get_etheraddr(p->netdev),
+ if (memcmp(opm->hw_addr, netdev_get_etheraddr(p->netdev),
ETH_ADDR_LEN) != 0) {
return;
}