[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110717073404.GA6786@electric-eye.fr.zoreil.com>
Date: Sun, 17 Jul 2011 09:34:04 +0200
From: Francois Romieu <romieu@...zoreil.com>
To: "jiangtao.jit" <jiangtao.jit@...il.com>
Cc: netdev <netdev@...r.kernel.org>
Subject: Re: problem with function vlan_get_protocol()
jiangtao.jit <jiangtao.jit@...il.com> :
[...]
> do we need an else branch on pointer protop failed ? through the else is unlikely
>
> if (likely(protop))
> protocol = *protop;
> else
> protocol = proto;
>
> is it necessary ?
The else branch signals that skb_header_pointer uncloaked a really tiny
ethernet frame : the content of proto is not even initialized (stack
allocation), whence irrelevant. In such circumstances the default
initialization value of protocol (0) does not seem too bad.
--
Ueimor
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists