[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121023115833.GB8664@thinkbox>
Date: Tue, 23 Oct 2012 13:58:34 +0200
From: Daniel Borkmann <dxchgb@...il.com>
To: davem@...emloft.net
Cc: netdev@...r.kernel.org
Subject: [PATCH net-next 2/2] packet: minor: make if case unlikely
This patch fixes the character width of max. 80 chars and also marks the
if-statement as unlikely since those flags are not supported for the receive
path anyway.
Signed-off-by: Daniel Borkmann <daniel.borkmann@....ee.ethz.ch>
---
net/packet/af_packet.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 1f2f465..adb1931 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -2601,7 +2601,8 @@ static int packet_recvmsg(struct kiocb *iocb, struct socket *sock,
struct sockaddr_ll *sll;
int vnet_hdr_len = 0;
- if (flags & ~(MSG_PEEK|MSG_DONTWAIT|MSG_TRUNC|MSG_CMSG_COMPAT|MSG_ERRQUEUE)) {
+ if (unlikely(flags & ~(MSG_PEEK | MSG_DONTWAIT | MSG_TRUNC |
+ MSG_CMSG_COMPAT | MSG_ERRQUEUE))) {
err = -EINVAL;
goto out;
}
--
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