Skip to content

Commit

Permalink
[NET]: cleanup extra semicolons
Browse files Browse the repository at this point in the history
Spring cleaning time...

There seems to be a lot of places in the network code that have
extra bogus semicolons after conditionals.  Most commonly is a
bogus semicolon after: switch() { }

Signed-off-by: Stephen Hemminger <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Apr 26, 2007
1 parent c462238 commit 3ff50b7
Show file tree
Hide file tree
Showing 47 changed files with 113 additions and 103 deletions.
3 changes: 2 additions & 1 deletion net/802/tr.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,8 @@ static int rif_seq_show(struct seq_file *seq, void *v)
if(j==1) {
segment=ntohs(entry->rseg[j-1])>>4;
seq_printf(seq," %03X",segment);
};
}

segment=ntohs(entry->rseg[j])>>4;
brdgnmb=ntohs(entry->rseg[j-1])&0x00f;
seq_printf(seq,"-%01X-%03X",brdgnmb,segment);
Expand Down
6 changes: 3 additions & 3 deletions net/8021q/vlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ static struct net_device *register_vlan_device(const char *eth_IF_name,
*/
default:
snprintf(name, IFNAMSIZ, "vlan%.4i", VLAN_ID);
};
}

new_dev = alloc_netdev(sizeof(struct vlan_dev_info), name,
vlan_setup);
Expand Down Expand Up @@ -685,7 +685,7 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
break;
}
break;
};
}

out:
return NOTIFY_DONE;
Expand Down Expand Up @@ -819,7 +819,7 @@ static int vlan_ioctl_handler(void __user *arg)
printk(VLAN_DBG "%s: Unknown VLAN CMD: %x \n",
__FUNCTION__, args.cmd);
return -EINVAL;
};
}
out:
return err;
}
Expand Down
4 changes: 2 additions & 2 deletions net/8021q/vlan_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ int vlan_dev_rebuild_header(struct sk_buff *skb)

memcpy(veth->h_source, dev->dev_addr, ETH_ALEN);
break;
};
}

return 0;
}
Expand Down Expand Up @@ -219,7 +219,7 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
break;
default:
break;
};
}

/* Was a VLAN packet, grab the encapsulated protocol, which the layer
* three protocols care about.
Expand Down
2 changes: 1 addition & 1 deletion net/ax25/ax25_ip.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ int ax25_rebuild_header(struct sk_buff *skb)
digipeat = route->digipeat;
dev = route->dev;
ip_mode = route->ip_mode;
};
}

if (dev == NULL)
dev = skb->dev;
Expand Down
4 changes: 2 additions & 2 deletions net/bluetooth/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ static int __hci_request(struct hci_dev *hdev, void (*req)(struct hci_dev *hdev,
default:
err = -ETIMEDOUT;
break;
};
}

hdev->req_status = hdev->req_result = 0;

Expand Down Expand Up @@ -1388,7 +1388,7 @@ static void hci_rx_task(unsigned long arg)
case HCI_SCODATA_PKT:
kfree_skb(skb);
continue;
};
}
}

/* Process frame */
Expand Down
2 changes: 1 addition & 1 deletion net/bluetooth/sco.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ static void sco_sock_close(struct sock *sk)
default:
sock_set_flag(sk, SOCK_ZAPPED);
break;
};
}

release_sock(sk);

Expand Down
2 changes: 1 addition & 1 deletion net/core/link_watch.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ static void rfc2863_policy(struct net_device *dev)
case IF_LINK_MODE_DEFAULT:
default:
break;
};
}

dev->operstate = operstate;

Expand Down
6 changes: 3 additions & 3 deletions net/core/pktgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ static int count_trail_chars(const char __user * user_buffer,
break;
default:
goto done;
};
}
}
done:
return i;
Expand Down Expand Up @@ -829,7 +829,7 @@ static int strn_len(const char __user * user_buffer, unsigned int maxlen)
break;
default:
break;
};
}
}
done_str:
return i;
Expand Down Expand Up @@ -1906,7 +1906,7 @@ static int pktgen_device_event(struct notifier_block *unused,
case NETDEV_UNREGISTER:
pktgen_mark_device(dev->name);
break;
};
}

return NOTIFY_DONE;
}
Expand Down
2 changes: 1 addition & 1 deletion net/core/rtnetlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ static void set_operstate(struct net_device *dev, unsigned char transition)
operstate == IF_OPER_UNKNOWN)
operstate = IF_OPER_DORMANT;
break;
};
}

if (dev->operstate != operstate) {
write_lock_bh(&dev_base_lock);
Expand Down
2 changes: 1 addition & 1 deletion net/core/skbuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ void kfree_skbmem(struct sk_buff *skb)
if (atomic_dec_and_test(fclone_ref))
kmem_cache_free(skbuff_fclone_cache, other);
break;
};
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/fib_semantics.c
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ int fib_semantic_match(struct list_head *head, const struct flowi *flp,
default:
printk(KERN_DEBUG "impossible 102\n");
return -EINVAL;
};
}
}
return err;
}
Expand Down
4 changes: 2 additions & 2 deletions net/ipv4/ipconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ static int __init ic_bootp_recv(struct sk_buff *skb, struct net_device *dev, str
if (opt[1] >= 4)
memcpy(&server_id, opt + 2, 4);
break;
};
}
}

#ifdef IPCONFIG_DEBUG
Expand Down Expand Up @@ -984,7 +984,7 @@ static int __init ic_bootp_recv(struct sk_buff *skb, struct net_device *dev, str
ic_myaddr = NONE;
ic_servaddr = NONE;
goto drop_unlock;
};
}

ic_dhcp_msgtype = mt;

Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/multipath_drr.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static int drr_dev_event(struct notifier_block *this,

spin_unlock_bh(&state_lock);
break;
};
}

return NOTIFY_DONE;
}
Expand Down
7 changes: 4 additions & 3 deletions net/ipv4/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ int tcp_ioctl(struct sock *sk, int cmd, unsigned long arg)
break;
default:
return -ENOIOCTLCMD;
};
}

return put_user(answ, (int __user *)arg);
}
Expand Down Expand Up @@ -1954,7 +1954,8 @@ static int do_tcp_setsockopt(struct sock *sk, int level,
default:
err = -ENOPROTOOPT;
break;
};
}

release_sock(sk);
return err;
}
Expand Down Expand Up @@ -2124,7 +2125,7 @@ static int do_tcp_getsockopt(struct sock *sk, int level,
return 0;
default:
return -ENOPROTOOPT;
};
}

if (put_user(len, optlen))
return -EFAULT;
Expand Down
9 changes: 5 additions & 4 deletions net/ipv4/tcp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -2708,7 +2708,7 @@ static int tcp_process_frto(struct sock *sk, u32 prior_snd_una, int flag)
default:
tcp_ratehalving_spur_to_response(sk);
break;
};
}
tp->frto_counter = 0;
}
return 0;
Expand Down Expand Up @@ -2915,10 +2915,11 @@ void tcp_parse_options(struct sk_buff *skb, struct tcp_options_received *opt_rx,
*/
break;
#endif
};
}

ptr+=opsize-2;
length-=opsize;
};
}
}
}

Expand Down Expand Up @@ -3124,7 +3125,7 @@ static void tcp_fin(struct sk_buff *skb, struct sock *sk, struct tcphdr *th)
printk(KERN_ERR "%s: Impossible, sk->sk_state=%d\n",
__FUNCTION__, sk->sk_state);
break;
};
}

/* It _is_ possible, that we have something out-of-order _after_ FIN.
* Probably, we should reset in this case. For now drop them.
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/xfrm4_policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl)
default:
fl->fl_ipsec_spi = 0;
break;
};
}
}
fl->proto = iph->protocol;
fl->fl4_dst = iph->daddr;
Expand Down
4 changes: 2 additions & 2 deletions net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2288,7 +2288,7 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
default:
addrconf_dev_config(dev);
break;
};
}
if (idev) {
if (run_pending)
addrconf_dad_run(idev);
Expand Down Expand Up @@ -2341,7 +2341,7 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
}
#endif
break;
};
}

return NOTIFY_OK;
}
Expand Down
2 changes: 1 addition & 1 deletion net/ipv6/datagram.c
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ int datagram_send_ctl(struct msghdr *msg, struct flowi *fl,
cmsg->cmsg_type);
err = -EINVAL;
break;
};
}
}

exit_f:
Expand Down
2 changes: 1 addition & 1 deletion net/ipv6/exthdrs.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ static int ip6_tlvopt_unknown(struct sk_buff **skbp, int optoff)
case 2: /* send ICMP PARM PROB regardless and drop packet */
icmpv6_param_prob(skb, ICMPV6_UNK_OPTION, optoff);
return 0;
};
}

kfree_skb(skb);
return 0;
Expand Down
5 changes: 3 additions & 2 deletions net/ipv6/icmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,8 @@ static int icmpv6_rcv(struct sk_buff **pskb)
*/

icmpv6_notify(skb, type, hdr->icmp6_code, hdr->icmp6_mtu);
};
}

kfree_skb(skb);
return 0;

Expand Down Expand Up @@ -865,7 +866,7 @@ int icmpv6_err_convert(int type, int code, int *err)
case ICMPV6_TIME_EXCEED:
*err = EHOSTUNREACH;
break;
};
}

return fatal;
}
Expand Down
2 changes: 1 addition & 1 deletion net/ipv6/ndisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1630,7 +1630,7 @@ int ndisc_rcv(struct sk_buff *skb)
case NDISC_REDIRECT:
ndisc_redirect_rcv(skb);
break;
};
}

return 0;
}
Expand Down
14 changes: 8 additions & 6 deletions net/ipv6/raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ static int rawv6_seticmpfilter(struct sock *sk, int level, int optname,
return 0;
default:
return -ENOPROTOOPT;
};
}

return 0;
}
Expand All @@ -907,7 +907,7 @@ static int rawv6_geticmpfilter(struct sock *sk, int level, int optname,
return 0;
default:
return -ENOPROTOOPT;
};
}

return 0;
}
Expand Down Expand Up @@ -961,7 +961,8 @@ static int rawv6_setsockopt(struct sock *sk, int level, int optname,
default:
return ipv6_setsockopt(sk, level, optname, optval,
optlen);
};
}

return do_rawv6_setsockopt(sk, level, optname, optval, optlen);
}

Expand All @@ -982,7 +983,7 @@ static int compat_rawv6_setsockopt(struct sock *sk, int level, int optname,
default:
return compat_ipv6_setsockopt(sk, level, optname,
optval, optlen);
};
}
return do_rawv6_setsockopt(sk, level, optname, optval, optlen);
}
#endif
Expand Down Expand Up @@ -1035,7 +1036,8 @@ static int rawv6_getsockopt(struct sock *sk, int level, int optname,
default:
return ipv6_getsockopt(sk, level, optname, optval,
optlen);
};
}

return do_rawv6_getsockopt(sk, level, optname, optval, optlen);
}

Expand All @@ -1056,7 +1058,7 @@ static int compat_rawv6_getsockopt(struct sock *sk, int level, int optname,
default:
return compat_ipv6_getsockopt(sk, level, optname,
optval, optlen);
};
}
return do_rawv6_getsockopt(sk, level, optname, optval, optlen);
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion net/ipv6/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -1760,7 +1760,7 @@ int ipv6_route_ioctl(unsigned int cmd, void __user *arg)
rtnl_unlock();

return err;
};
}

return -EINVAL;
}
Expand Down
5 changes: 3 additions & 2 deletions net/ipv6/xfrm6_policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ __xfrm6_bundle_create(struct xfrm_policy *policy, struct xfrm_state **xfrm, int
if (!afinfo) {
dst = *dst_p;
goto error;
};
}

dst_prev->output = afinfo->output;
xfrm_state_put_afinfo(afinfo);
/* Sheit... I remember I did this right. Apparently,
Expand Down Expand Up @@ -337,7 +338,7 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl)
fl->fl_ipsec_spi = 0;
fl->proto = nexthdr;
return;
};
}
}
}

Expand Down
Loading

0 comments on commit 3ff50b7

Please sign in to comment.