On 2016-05-16 at 22:19 Dan Cross <[email protected]> wrote:
> This simple change removes a level of nesting in the ARP
> code. It was made mostly to test a Git configuration
> change, but is a reasonable change in its own right.
Given the overall context of the code, I think it was a little better
originally.
Here's the whole original version:
if (isv4(a->ip)) {
while (xp) {
next = xp->list;
freeblist(xp);
xp = next;
}
} else { // queue icmp unreachable for rxmitproc later on, w/o arp lock
if (xp) {
if (arp->dropl == NULL)
arp->dropf = xp;
else
arp->dropl->list = xp;
for (next = xp->list; next; next = next->list)
xp = next;
arp->dropl = xp;
rendez_wakeup(&arp->rxmtq);
}
}
The if-else is about whether or not it's ipv4. Pulling the xp check up
a level of nesting 'promotes' it to that level. The stuff inside the
if/else is basically
if (isv4(a->ip)) {
deal_with_xp_for_v4();
} else { // queue icmp unreachable for rxmitproc later on, w/o arp lock
deal_with_xp_for_v6();
}
Anyway this is super trivial stuff. I'm ok with either version. If
you really want the actual *code* to change, then I'll merge it.
But if you're just making this change to work out some code workflow
issues, then you can actually use another repo for it.
Barret
--
You received this message because you are subscribed to the Google Groups
"Akaros" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.