diff options
author | Eric Dumazet <edumazet@google.com> | 2012-05-16 22:48:15 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-17 04:50:21 -0400 |
commit | dc6b9b78234fecdc6d2ca5e1629185718202bcf5 (patch) | |
tree | 81faf65c9cd9747d8dfe2828ff624507459bdf24 /net | |
parent | 1f352920b908247273a7c1937fd8c341cc1cedb1 (diff) | |
download | linux-3.10-dc6b9b78234fecdc6d2ca5e1629185718202bcf5.tar.gz linux-3.10-dc6b9b78234fecdc6d2ca5e1629185718202bcf5.tar.bz2 linux-3.10-dc6b9b78234fecdc6d2ca5e1629185718202bcf5.zip |
net: include/net/sock.h cleanup
bool/const conversions where possible
__inline__ -> inline
space cleanups
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/dccp/proto.c | 4 | ||||
-rw-r--r-- | net/ipv4/tcp.c | 12 | ||||
-rw-r--r-- | net/llc/af_llc.c | 4 |
3 files changed, 10 insertions, 10 deletions
diff --git a/net/dccp/proto.c b/net/dccp/proto.c index 7065c0ae1e7..6c7c78b8394 100644 --- a/net/dccp/proto.c +++ b/net/dccp/proto.c @@ -848,7 +848,7 @@ int dccp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, default: dccp_pr_debug("packet_type=%s\n", dccp_packet_name(dh->dccph_type)); - sk_eat_skb(sk, skb, 0); + sk_eat_skb(sk, skb, false); } verify_sock_status: if (sock_flag(sk, SOCK_DONE)) { @@ -905,7 +905,7 @@ verify_sock_status: len = skb->len; found_fin_ok: if (!(flags & MSG_PEEK)) - sk_eat_skb(sk, skb, 0); + sk_eat_skb(sk, skb, false); break; } while (1); out: diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index feb2e25091b..e8a80d0b5b3 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -1473,11 +1473,11 @@ int tcp_read_sock(struct sock *sk, read_descriptor_t *desc, break; } if (tcp_hdr(skb)->fin) { - sk_eat_skb(sk, skb, 0); + sk_eat_skb(sk, skb, false); ++seq; break; } - sk_eat_skb(sk, skb, 0); + sk_eat_skb(sk, skb, false); if (!desc->count) break; tp->copied_seq = seq; @@ -1513,7 +1513,7 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, int target; /* Read at least this many bytes */ long timeo; struct task_struct *user_recv = NULL; - int copied_early = 0; + bool copied_early = false; struct sk_buff *skb; u32 urg_hole = 0; @@ -1801,7 +1801,7 @@ do_prequeue: dma_async_memcpy_issue_pending(tp->ucopy.dma_chan); if ((offset + used) == skb->len) - copied_early = 1; + copied_early = true; } else #endif @@ -1835,7 +1835,7 @@ skip_copy: goto found_fin_ok; if (!(flags & MSG_PEEK)) { sk_eat_skb(sk, skb, copied_early); - copied_early = 0; + copied_early = false; } continue; @@ -1844,7 +1844,7 @@ skip_copy: ++*seq; if (!(flags & MSG_PEEK)) { sk_eat_skb(sk, skb, copied_early); - copied_early = 0; + copied_early = false; } break; } while (len > 0); diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c index e9440753e16..fe5453c3e71 100644 --- a/net/llc/af_llc.c +++ b/net/llc/af_llc.c @@ -838,7 +838,7 @@ static int llc_ui_recvmsg(struct kiocb *iocb, struct socket *sock, if (!(flags & MSG_PEEK)) { spin_lock_irqsave(&sk->sk_receive_queue.lock, cpu_flags); - sk_eat_skb(sk, skb, 0); + sk_eat_skb(sk, skb, false); spin_unlock_irqrestore(&sk->sk_receive_queue.lock, cpu_flags); *seq = 0; } @@ -861,7 +861,7 @@ copy_uaddr: if (!(flags & MSG_PEEK)) { spin_lock_irqsave(&sk->sk_receive_queue.lock, cpu_flags); - sk_eat_skb(sk, skb, 0); + sk_eat_skb(sk, skb, false); spin_unlock_irqrestore(&sk->sk_receive_queue.lock, cpu_flags); *seq = 0; } |