Skip to content

Commit

Permalink
appletalk: Reduce switch/case indent
Browse files Browse the repository at this point in the history
Make the case labels the same indent as the switch.

(git diff -w net/appletalk shows no difference)

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
JoePerches authored and davem330 committed Jul 1, 2011
1 parent 4e985ad commit 4a9e4b0
Show file tree
Hide file tree
Showing 2 changed files with 259 additions and 259 deletions.
138 changes: 69 additions & 69 deletions net/appletalk/aarp.c
Original file line number Diff line number Diff line change
Expand Up @@ -779,87 +779,87 @@ static int aarp_rcv(struct sk_buff *skb, struct net_device *dev,
}

switch (function) {
case AARP_REPLY:
if (!unresolved_count) /* Speed up */
break;

/* Find the entry. */
a = __aarp_find_entry(unresolved[hash], dev, &sa);
if (!a || dev != a->dev)
break;
case AARP_REPLY:
if (!unresolved_count) /* Speed up */
break;

/* We can fill one in - this is good. */
memcpy(a->hwaddr, ea->hw_src, ETH_ALEN);
__aarp_resolved(&unresolved[hash], a, hash);
if (!unresolved_count)
mod_timer(&aarp_timer,
jiffies + sysctl_aarp_expiry_time);
/* Find the entry. */
a = __aarp_find_entry(unresolved[hash], dev, &sa);
if (!a || dev != a->dev)
break;

case AARP_REQUEST:
case AARP_PROBE:
/* We can fill one in - this is good. */
memcpy(a->hwaddr, ea->hw_src, ETH_ALEN);
__aarp_resolved(&unresolved[hash], a, hash);
if (!unresolved_count)
mod_timer(&aarp_timer,
jiffies + sysctl_aarp_expiry_time);
break;

case AARP_REQUEST:
case AARP_PROBE:

/*
* If it is my address set ma to my address and reply.
* We can treat probe and request the same. Probe
* simply means we shouldn't cache the querying host,
* as in a probe they are proposing an address not
* using one.
*
* Support for proxy-AARP added. We check if the
* address is one of our proxies before we toss the
* packet out.
*/

sa.s_node = ea->pa_dst_node;
sa.s_net = ea->pa_dst_net;

/* See if we have a matching proxy. */
ma = __aarp_proxy_find(dev, &sa);
if (!ma)
ma = &ifa->address;
else { /* We need to make a copy of the entry. */
da.s_node = sa.s_node;
da.s_net = sa.s_net;
ma = &da;
}

if (function == AARP_PROBE) {
/*
* If it is my address set ma to my address and reply.
* We can treat probe and request the same. Probe
* simply means we shouldn't cache the querying host,
* as in a probe they are proposing an address not
* using one.
*
* Support for proxy-AARP added. We check if the
* address is one of our proxies before we toss the
* packet out.
* A probe implies someone trying to get an
* address. So as a precaution flush any
* entries we have for this address.
*/
a = __aarp_find_entry(resolved[sa.s_node %
(AARP_HASH_SIZE - 1)],
skb->dev, &sa);

sa.s_node = ea->pa_dst_node;
sa.s_net = ea->pa_dst_net;

/* See if we have a matching proxy. */
ma = __aarp_proxy_find(dev, &sa);
if (!ma)
ma = &ifa->address;
else { /* We need to make a copy of the entry. */
da.s_node = sa.s_node;
da.s_net = sa.s_net;
ma = &da;
}

if (function == AARP_PROBE) {
/*
* A probe implies someone trying to get an
* address. So as a precaution flush any
* entries we have for this address.
*/
a = __aarp_find_entry(resolved[sa.s_node %
(AARP_HASH_SIZE - 1)],
skb->dev, &sa);

/*
* Make it expire next tick - that avoids us
* getting into a probe/flush/learn/probe/
* flush/learn cycle during probing of a slow
* to respond host addr.
*/
if (a) {
a->expires_at = jiffies - 1;
mod_timer(&aarp_timer, jiffies +
sysctl_aarp_tick_time);
}
/*
* Make it expire next tick - that avoids us
* getting into a probe/flush/learn/probe/
* flush/learn cycle during probing of a slow
* to respond host addr.
*/
if (a) {
a->expires_at = jiffies - 1;
mod_timer(&aarp_timer, jiffies +
sysctl_aarp_tick_time);
}
}

if (sa.s_node != ma->s_node)
break;
if (sa.s_node != ma->s_node)
break;

if (sa.s_net && ma->s_net && sa.s_net != ma->s_net)
break;
if (sa.s_net && ma->s_net && sa.s_net != ma->s_net)
break;

sa.s_node = ea->pa_src_node;
sa.s_net = ea->pa_src_net;
sa.s_node = ea->pa_src_node;
sa.s_net = ea->pa_src_net;

/* aarp_my_address has found the address to use for us.
*/
aarp_send_reply(dev, ma, &sa, ea->hw_src);
break;
/* aarp_my_address has found the address to use for us.
*/
aarp_send_reply(dev, ma, &sa, ea->hw_src);
break;
}

unlock:
Expand Down
Loading

0 comments on commit 4a9e4b0

Please sign in to comment.