Skip to contentSkip to conversation

net: caif: slight optimization of addr compare

PATCH Superseded Ding Tianhong 1 participant 1 message Dec 27, 2013

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 20/20 net: caif: slight optimization of addr compare

Use possibly more efficient ether_addr_equal to instead of memcmp.

Cc Dmitry Tarnyagin <[email protected]>
Cc "David S. Miller" <[email protected]>
---
 net/caif/cfrfml.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/caif/cfrfml.c +1 -1
index 61d7617..c680414 100644
@@ -79,7 +79,7 @@ static struct cfpkt *rfm_append(struct cfrfml *rfml, char *seghead,
 		return NULL;
 
 	/* Verify correct header */
-	if (memcmp(seghead, rfml->seghead, 6) != 0)
+	if (!ether_addr_equal(seghead, rfml->seghead))
 		return NULL;
 
 	tmppkt = cfpkt_append(rfml->incomplete_frm, pkt,
Signature · 1 line
1.8.0