lkml.org 
[lkml]   [2013]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH net-next v2 20/20] net: caif: slight optimization of addr compare
From
Date
On Sat, 2013-12-28 at 14:18 +0800, Ding Tianhong wrote:
> Use possibly more efficient ether_addr_equal
> to instead of memcmp.

This may be a distinction without difference, but
is a CAIF seghead also an ethernet address?

> diff --git a/net/caif/cfrfml.c b/net/caif/cfrfml.c
[]
> @@ -79,7 +79,7 @@ static struct cfpkt *rfm_append(struct cfrfml *rfml, char *seghead,
[]
> /* Verify correct header */
> - if (memcmp(seghead, rfml->seghead, 6) != 0)
> + if (!ether_addr_equal(seghead, rfml->seghead))




\
 
 \ /
  Last update: 2013-12-28 08:21    [W:0.040 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site