netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] INET: style updates for the inet_sock->is_icsk assignment fix
@ 2007-01-09 17:51 Paul Moore
  2007-01-09 18:45 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Moore @ 2007-01-09 17:51 UTC (permalink / raw)
  To: netdev; +Cc: Jarek Poplawski, Arnaldo Carvalho de Melo

[-- 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-01-09 22:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-09 17:51 [PATCH] INET: style updates for the inet_sock->is_icsk assignment fix Paul Moore
2007-01-09 18:45 ` Arnaldo Carvalho de Melo
2007-01-09 22:37   ` David Miller

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).