diff options
author | Julia Lawall <julia@diku.dk> | 2009-08-05 08:34:55 -0400 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2009-08-05 18:46:15 -0400 |
commit | da34d4248bd2013ee64ce51e63ec0ebd1f32b46c (patch) | |
tree | 3934c6582b73fb3411799050ea5268daf2b2b814 /security/smack | |
parent | 1c388ad054fb1ead3dc354b1719570b99e464135 (diff) |
security/smack: Use AF_INET for sin_family field
Elsewhere the sin_family field holds a value with a name of the form
AF_..., so it seems reasonable to do so here as well. Also the values of
PF_INET and AF_INET are the same.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
struct sockaddr_in sip;
@@
(
sip.sin_family ==
- PF_INET
+ AF_INET
|
sip.sin_family !=
- PF_INET
+ AF_INET
|
sip.sin_family =
- PF_INET
+ AF_INET
)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/smack')
-rw-r--r-- | security/smack/smack_lsm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index 1c9bdbcbe3d2..c243a2b25832 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c | |||
@@ -2464,7 +2464,7 @@ static int smack_socket_sendmsg(struct socket *sock, struct msghdr *msg, | |||
2464 | /* | 2464 | /* |
2465 | * Perfectly reasonable for this to be NULL | 2465 | * Perfectly reasonable for this to be NULL |
2466 | */ | 2466 | */ |
2467 | if (sip == NULL || sip->sin_family != PF_INET) | 2467 | if (sip == NULL || sip->sin_family != AF_INET) |
2468 | return 0; | 2468 | return 0; |
2469 | 2469 | ||
2470 | return smack_netlabel_send(sock->sk, sip); | 2470 | return smack_netlabel_send(sock->sk, sip); |