Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
eth_mac_equal takes const pointers
[vpp.git]
/
src
/
vnet
/
ethernet
/
ethernet.h
diff --git
a/src/vnet/ethernet/ethernet.h
b/src/vnet/ethernet/ethernet.h
index
9a23448
..
cc44c4e
100644
(file)
--- a/
src/vnet/ethernet/ethernet.h
+++ b/
src/vnet/ethernet/ethernet.h
@@
-553,7
+553,7
@@
matched:
// Compare two ethernet macs. Return 1 if they are the same, 0 if different
always_inline u32
// Compare two ethernet macs. Return 1 if they are the same, 0 if different
always_inline u32
-eth_mac_equal (
u8 * mac1,
u8 * mac2)
+eth_mac_equal (
const u8 * mac1, const
u8 * mac2)
{
return (*((u32 *) (mac1 + 0)) == *((u32 *) (mac2 + 0)) &&
*((u32 *) (mac1 + 2)) == *((u32 *) (mac2 + 2)));
{
return (*((u32 *) (mac1 + 0)) == *((u32 *) (mac2 + 0)) &&
*((u32 *) (mac1 + 2)) == *((u32 *) (mac2 + 2)));