Skip to contentSkip to conversation

INET: style updates for the inet_sock->is_icsk assignment fix

PATCH In review Paul Moore 3 participants 3 messages Jan 9, 2007

Subsystems (2)
lore
Share & tools
lore

Paul Moore

author
#0 lore raw

PATCH 1/1 INET: style updates for the inet_sock->is_icsk assignment fix

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

Cc Jarek Poplawski <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
---
 net/ipv4/af_inet.c  |    2 +-
 net/ipv6/af_inet6.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
net/ipv4/af_inet.c +1 -1
Index: 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;
net/ipv6/af_inet6.c +1 -1
Index: 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

maintainer
#2 lore raw

From: "Arnaldo Carvalho de Melo" <[email protected]>
Date: Tue, 9 Jan 2007 16:45:12 -0200

Quoted 9 lines · Paul Moore
Quoted 6 lines

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

Cc Jarek Poplawski <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>

Ok, the style police win :)