Commit 7c3c299d authored by dingtianhong's avatar dingtianhong Committed by David S. Miller

net: fddi: slight optimization of addr compare

Use possibly more efficient ether_addr_equal
to instead of memcmp.

Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: default avatarDing Tianhong <dingtianhong@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d9f394fe
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include "h/smc.h" #include "h/smc.h"
#include "h/supern_2.h" #include "h/supern_2.h"
#include <linux/bitrev.h> #include <linux/bitrev.h>
#include <linux/etherdevice.h>
#ifndef lint #ifndef lint
static const char ID_sccs[] = "@(#)fplustm.c 1.32 99/02/23 (C) SK " ; static const char ID_sccs[] = "@(#)fplustm.c 1.32 99/02/23 (C) SK " ;
...@@ -1082,7 +1083,7 @@ static struct s_fpmc* mac_get_mc_table(struct s_smc *smc, ...@@ -1082,7 +1083,7 @@ static struct s_fpmc* mac_get_mc_table(struct s_smc *smc,
slot = tb ; slot = tb ;
continue ; continue ;
} }
if (memcmp((char *)&tb->a,(char *)own,6)) if (!ether_addr_equal((char *)&tb->a, (char *)own))
continue ; continue ;
return tb; return tb;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment