diff options
author | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2006-11-14 14:57:34 (GMT) |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 05:22:30 (GMT) |
commit | 09dbc3895e3242346bd434dae743c456fd28fc6a (patch) | |
tree | a7bc1d0879b025152bff9e4a0ba44beaa5da654b /net/dccp/proto.c | |
parent | c02fdc0e81e9c735d8d895af1e201b235df326d8 (diff) | |
download | linux-fsl-qoriq-09dbc3895e3242346bd434dae743c456fd28fc6a.tar.xz |
[DCCP]: Miscellaneous code tidy-ups
This patch does not change code; it performs some trivial clean/tidy-ups:
* removal of a `debug_prefix' string in favour of the
already existing dccp_role(sk)
* add documentation of structures and constants
* separated out the cases for invalid packets (step 1
of the packet validation)
* removing duplicate statements
* combining declaration & initialisation
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/dccp/proto.c')
-rw-r--r-- | net/dccp/proto.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/net/dccp/proto.c b/net/dccp/proto.c index 9c9c08c..0225bda 100644 --- a/net/dccp/proto.c +++ b/net/dccp/proto.c @@ -452,9 +452,8 @@ out_free_val: static int do_dccp_setsockopt(struct sock *sk, int level, int optname, char __user *optval, int optlen) { - struct dccp_sock *dp; - int err; - int val; + struct dccp_sock *dp = dccp_sk(sk); + int val, err = 0; if (optlen < sizeof(int)) return -EINVAL; @@ -466,9 +465,6 @@ static int do_dccp_setsockopt(struct sock *sk, int level, int optname, return dccp_setsockopt_service(sk, val, optval, optlen); lock_sock(sk); - dp = dccp_sk(sk); - err = 0; - switch (optname) { case DCCP_SOCKOPT_PACKET_SIZE: dp->dccps_packet_size = val; |