From: Rupesh Gujare <rgujare@ozmodevices.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [patch] staging: ozwpan: fix memcmp() test in oz_set_active_pd()
Date: Sun, 19 Aug 2012 12:15:05 +0000 [thread overview]
Message-ID: <5030D8C9.9080207@ozmodevices.com> (raw)
In-Reply-To: <20120818084759.GB30592@elgon.mountain>
On 18/08/12 09:47, Dan Carpenter wrote:
> "addr" is a pointer so it's either 4 or 8 bytes, but actually we want
> to compare 6 bytes (ETH_ALEN).
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Rupesh Gujare<rgujare@ozmodevices.com>
> diff --git a/drivers/staging/ozwpan/ozcdev.c b/drivers/staging/ozwpan/ozcdev.c
> index d983219..63c1b67 100644
> --- a/drivers/staging/ozwpan/ozcdev.c
> +++ b/drivers/staging/ozwpan/ozcdev.c
> @@ -213,7 +213,7 @@ static int oz_set_active_pd(u8 *addr)
> if (old_pd)
> oz_pd_put(old_pd);
> } else {
> - if (!memcmp(addr, "\0\0\0\0\0\0", sizeof(addr))) {
> + if (!memcmp(addr, "\0\0\0\0\0\0", ETH_ALEN)) {
> spin_lock_bh(&g_cdev.lock);
> pd = g_cdev.active_pd;
> g_cdev.active_pd = 0;
>
--
Regards,
Rupesh Gujare
next prev parent reply other threads:[~2012-08-19 12:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-18 8:47 [patch] staging: ozwpan: fix memcmp() test in oz_set_active_pd() Dan Carpenter
2012-08-19 12:15 ` Rupesh Gujare [this message]
2012-08-19 12:37 ` Tomas Winkler
2012-08-19 13:06 ` Rupesh Gujare
2012-08-19 22:23 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5030D8C9.9080207@ozmodevices.com \
--to=rgujare@ozmodevices.com \
--cc=kernel-janitors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.