summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2011-01-08 11:31:12 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2011-01-08 11:31:12 +0100
commitd32a071da9655c2d05038e721bcf020498263c1e (patch)
tree938842065dcd1278183c7d50f371fba51b67d29c
parentdad7ee70c1711b2cbdfd86c615736fe12c0d126a (diff)
downloadbird-d32a071da9655c2d05038e721bcf020498263c1e.tar
bird-d32a071da9655c2d05038e721bcf020498263c1e.zip
Some cleanups in krt_read_ifinfo().
-rw-r--r--sysdep/bsd/krt-sock.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c
index 0e96f41..a3e17e2 100644
--- a/sysdep/bsd/krt-sock.c
+++ b/sysdep/bsd/krt-sock.c
@@ -414,16 +414,16 @@ krt_read_ifinfo(struct ks_msg *msg)
struct iface *iface = NULL, f;
int fl = ifm->ifm_flags;
- for(i = 1; i!=0; i <<= 1)
+ for (i = 1; i<=RTA_IFP; i <<= 1)
{
- if((i & ifm->ifm_addrs) && (i == RTA_IFP))
+ if (i & ifm->ifm_addrs)
{
- if( i == RTA_IFP)
+ if (i == RTA_IFP)
{
dl = (struct sockaddr_dl *)body;
break;
}
- body += ROUNDUP(((struct sockaddr *)&(body))->sa_len);\
+ body += ROUNDUP(((struct sockaddr *)&(body))->sa_len);
}
}