netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Paul Moore" <paul.moore@hp.com>
To: netdev@vger.kernel.org
Cc: Jarek Poplawski <jarkao2@o2.pl>,
	Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
Subject: [PATCH] INET: style updates for the inet_sock->is_icsk assignment fix
Date: Tue, 09 Jan 2007 12:51:30 -0500	[thread overview]
Message-ID: <20070109175144.787024589@flek.zko.hp.com> (raw)

[-- Attachment #1: network-cleanup_icsk_assignment --]
[-- Type: text/plain, Size: 1360 bytes --]

A quick patch to change the inet_sock->is_icsk assignment to better fit with
existing kernel coding style.

Signed-off-by: Paul Moore <paul.moore@hp.com>
Cc: Jarek Poplawski <jarkao2@o2.pl>
Cc: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
---
 net/ipv4/af_inet.c  |    2 +-
 net/ipv6/af_inet6.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Index: net-2.6.20_bugfix_2/net/ipv4/af_inet.c
===================================================================
--- net-2.6.20_bugfix_2.orig/net/ipv4/af_inet.c
+++ net-2.6.20_bugfix_2/net/ipv4/af_inet.c
@@ -305,7 +305,7 @@ lookup_protocol:
 		sk->sk_reuse = 1;
 
 	inet = inet_sk(sk);
-	inet->is_icsk = (INET_PROTOSW_ICSK & answer_flags) == INET_PROTOSW_ICSK;
+	inet->is_icsk = (INET_PROTOSW_ICSK & answer_flags) != 0;
 
 	if (SOCK_RAW == sock->type) {
 		inet->num = protocol;
Index: net-2.6.20_bugfix_2/net/ipv6/af_inet6.c
===================================================================
--- net-2.6.20_bugfix_2.orig/net/ipv6/af_inet6.c
+++ net-2.6.20_bugfix_2/net/ipv6/af_inet6.c
@@ -171,7 +171,7 @@ lookup_protocol:
 		sk->sk_reuse = 1;
 
 	inet = inet_sk(sk);
-	inet->is_icsk = (INET_PROTOSW_ICSK & answer_flags) == INET_PROTOSW_ICSK;
+	inet->is_icsk = (INET_PROTOSW_ICSK & answer_flags) != 0;
 
 	if (SOCK_RAW == sock->type) {
 		inet->num = protocol;

--
paul moore
linux security @ hp


             reply	other threads:[~2007-01-09 17:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-09 17:51 Paul Moore [this message]
2007-01-09 18:45 ` [PATCH] INET: style updates for the inet_sock->is_icsk assignment fix Arnaldo Carvalho de Melo
2007-01-09 22:37   ` David Miller

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=20070109175144.787024589@flek.zko.hp.com \
    --to=paul.moore@hp.com \
    --cc=arnaldo.melo@gmail.com \
    --cc=jarkao2@o2.pl \
    --cc=netdev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).