git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
06c1bfd
)
ether: fix local address check
author
Thomas Monjalon
<thomas.monjalon@6wind.com>
Fri, 1 Aug 2014 15:53:51 +0000
(17:53 +0200)
committer
Thomas Monjalon
<thomas.monjalon@6wind.com>
Fri, 1 Aug 2014 15:56:54 +0000
(17:56 +0200)
cppcheck reports show that is_local_admin_ether_addr() was broken:
Expression '(X & 0x2) == 0x1' is always false
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
lib/librte_ether/rte_ether.h
patch
|
blob
|
history
diff --git
a/lib/librte_ether/rte_ether.h
b/lib/librte_ether/rte_ether.h
index
cd0c7c4
..
2e08f23
100644
(file)
--- a/
lib/librte_ether/rte_ether.h
+++ b/
lib/librte_ether/rte_ether.h
@@
-205,7
+205,7
@@
static inline int is_universal_ether_addr(const struct ether_addr *ea)
*/
static inline int is_local_admin_ether_addr(const struct ether_addr *ea)
{
- return ((ea->addr_bytes[0] & ETHER_LOCAL_ADMIN_ADDR)
== 1
);
+ return ((ea->addr_bytes[0] & ETHER_LOCAL_ADMIN_ADDR)
!= 0
);
}
/**