From 543d9cfeec4d58ad3fd974db5531b06b6b95deb4 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Mon, 20 Mar 2006 22:48:35 -0800 Subject: [NET]: Identation & other cleanups related to compat_[gs]etsockopt cset No code changes, just tidying up, in some cases moving EXPORT_SYMBOLs to just after the function exported, etc. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller --- net/core/sock.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'net/core') diff --git a/net/core/sock.c b/net/core/sock.c index dd63cdea3fe7..1a7e6eac90b0 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -1386,14 +1386,14 @@ int sock_common_getsockopt(struct socket *sock, int level, int optname, EXPORT_SYMBOL(sock_common_getsockopt); #ifdef CONFIG_COMPAT -int compat_sock_common_getsockopt(struct socket *sock, int level, - int optname, char __user *optval, int __user *optlen) +int compat_sock_common_getsockopt(struct socket *sock, int level, int optname, + char __user *optval, int __user *optlen) { struct sock *sk = sock->sk; - if (sk->sk_prot->compat_setsockopt) - return sk->sk_prot->compat_getsockopt(sk, level, - optname, optval, optlen); + if (sk->sk_prot->compat_setsockopt != NULL) + return sk->sk_prot->compat_getsockopt(sk, level, optname, + optval, optlen); return sk->sk_prot->getsockopt(sk, level, optname, optval, optlen); } EXPORT_SYMBOL(compat_sock_common_getsockopt); @@ -1429,14 +1429,14 @@ int sock_common_setsockopt(struct socket *sock, int level, int optname, EXPORT_SYMBOL(sock_common_setsockopt); #ifdef CONFIG_COMPAT -int compat_sock_common_setsockopt(struct socket *sock, - int level, int optname, char __user *optval, int optlen) +int compat_sock_common_setsockopt(struct socket *sock, int level, int optname, + char __user *optval, int optlen) { struct sock *sk = sock->sk; - if (sk->sk_prot->compat_setsockopt) - return sk->sk_prot->compat_setsockopt(sk, level, - optname, optval, optlen); + if (sk->sk_prot->compat_setsockopt != NULL) + return sk->sk_prot->compat_setsockopt(sk, level, optname, + optval, optlen); return sk->sk_prot->setsockopt(sk, level, optname, optval, optlen); } EXPORT_SYMBOL(compat_sock_common_setsockopt); -- cgit v1.2.1