Thread (5 messages) 5 messages, 4 authors, 2005-06-23

Re: [patch] devinet: cleanup if statements

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2005-06-23 11:38:00

David S. Miller [off-list ref] wrote:
The second hunk of your patch seems to defeat the intention
of that code.  I believe the idea is that if the label and
the device name differ, use the label.
Actually I think Prasanna is right.  The if conditional is testing
whether ifa->ifa_label is NULL.  As ifa->ifa_label is an array and
it's not the first element in the structure, it can't possibly be
NULL.

With your interpretation above his patch is correct as well.  If
we want to use the label when it is different from the device name,
then it is equivalent to always use the label since the only time
we'd use the device name is when it's equal to the label :)

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} [off-list ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help