ipv4: do clean up with spaces
Fix checkpatch errors like: ERROR: spaces required around that XXX Signed-off-by: Weilong Chen <chenweilong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f55b0821b9
commit
a22318e83b
|
@ -167,7 +167,7 @@ int ip_options_echo(struct ip_options *dopt, struct sk_buff *skb)
|
||||||
soffset -= 4;
|
soffset -= 4;
|
||||||
if (soffset > 3) {
|
if (soffset > 3) {
|
||||||
memcpy(&faddr, &start[soffset-1], 4);
|
memcpy(&faddr, &start[soffset-1], 4);
|
||||||
for (soffset-=4, doffset=4; soffset > 3; soffset-=4, doffset+=4)
|
for (soffset -= 4, doffset = 4; soffset > 3; soffset -= 4, doffset += 4)
|
||||||
memcpy(&dptr[doffset-1], &start[soffset-1], 4);
|
memcpy(&dptr[doffset-1], &start[soffset-1], 4);
|
||||||
/*
|
/*
|
||||||
* RFC1812 requires to fix illegal source routes.
|
* RFC1812 requires to fix illegal source routes.
|
||||||
|
@ -227,7 +227,7 @@ void ip_options_fragment(struct sk_buff *skb)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
optlen = optptr[1];
|
optlen = optptr[1];
|
||||||
if (optlen<2 || optlen>l)
|
if (optlen < 2 || optlen > l)
|
||||||
return;
|
return;
|
||||||
if (!IPOPT_COPIED(*optptr))
|
if (!IPOPT_COPIED(*optptr))
|
||||||
memset(optptr, IPOPT_NOOP, optlen);
|
memset(optptr, IPOPT_NOOP, optlen);
|
||||||
|
@ -276,7 +276,7 @@ int ip_options_compile(struct net *net,
|
||||||
for (l = opt->optlen; l > 0; ) {
|
for (l = opt->optlen; l > 0; ) {
|
||||||
switch (*optptr) {
|
switch (*optptr) {
|
||||||
case IPOPT_END:
|
case IPOPT_END:
|
||||||
for (optptr++, l--; l>0; optptr++, l--) {
|
for (optptr++, l--; l > 0; optptr++, l--) {
|
||||||
if (*optptr != IPOPT_END) {
|
if (*optptr != IPOPT_END) {
|
||||||
*optptr = IPOPT_END;
|
*optptr = IPOPT_END;
|
||||||
opt->is_changed = 1;
|
opt->is_changed = 1;
|
||||||
|
@ -289,7 +289,7 @@ int ip_options_compile(struct net *net,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
optlen = optptr[1];
|
optlen = optptr[1];
|
||||||
if (optlen<2 || optlen>l) {
|
if (optlen < 2 || optlen > l) {
|
||||||
pp_ptr = optptr;
|
pp_ptr = optptr;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
@ -572,7 +572,7 @@ void ip_forward_options(struct sk_buff *skb)
|
||||||
|
|
||||||
optptr = raw + opt->srr;
|
optptr = raw + opt->srr;
|
||||||
|
|
||||||
for ( srrptr=optptr[2], srrspace = optptr[1];
|
for ( srrptr = optptr[2], srrspace = optptr[1];
|
||||||
srrptr <= srrspace;
|
srrptr <= srrspace;
|
||||||
srrptr += 4
|
srrptr += 4
|
||||||
) {
|
) {
|
||||||
|
@ -628,7 +628,7 @@ int ip_options_rcv_srr(struct sk_buff *skb)
|
||||||
if (rt->rt_type != RTN_LOCAL)
|
if (rt->rt_type != RTN_LOCAL)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
for (srrptr=optptr[2], srrspace = optptr[1]; srrptr <= srrspace; srrptr += 4) {
|
for (srrptr = optptr[2], srrspace = optptr[1]; srrptr <= srrspace; srrptr += 4) {
|
||||||
if (srrptr + 3 > srrspace) {
|
if (srrptr + 3 > srrspace) {
|
||||||
icmp_send(skb, ICMP_PARAMETERPROB, 0, htonl((opt->srr+2)<<24));
|
icmp_send(skb, ICMP_PARAMETERPROB, 0, htonl((opt->srr+2)<<24));
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
|
@ -3686,7 +3686,7 @@ const u8 *tcp_parse_md5sig_option(const struct tcphdr *th)
|
||||||
int opcode = *ptr++;
|
int opcode = *ptr++;
|
||||||
int opsize;
|
int opsize;
|
||||||
|
|
||||||
switch(opcode) {
|
switch (opcode) {
|
||||||
case TCPOPT_EOL:
|
case TCPOPT_EOL:
|
||||||
return NULL;
|
return NULL;
|
||||||
case TCPOPT_NOP:
|
case TCPOPT_NOP:
|
||||||
|
@ -4046,7 +4046,7 @@ static void tcp_sack_remove(struct tcp_sock *tp)
|
||||||
WARN_ON(before(tp->rcv_nxt, sp->end_seq));
|
WARN_ON(before(tp->rcv_nxt, sp->end_seq));
|
||||||
|
|
||||||
/* Zap this SACK, by moving forward any other SACKS. */
|
/* Zap this SACK, by moving forward any other SACKS. */
|
||||||
for (i=this_sack+1; i < num_sacks; i++)
|
for (i = this_sack+1; i < num_sacks; i++)
|
||||||
tp->selective_acks[i-1] = tp->selective_acks[i];
|
tp->selective_acks[i-1] = tp->selective_acks[i];
|
||||||
num_sacks--;
|
num_sacks--;
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue