Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

little bit of code reordering.

  • Loading branch information...
commit e96692d30cb7c757d366aa08311cb04c96491dfe 1 parent fefab83
itojun authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 kame/kame/faithd/faithd.c
View
10 kame/kame/faithd/faithd.c
@@ -729,16 +729,16 @@ grab_myaddrs()
ifrp < ifr_end;
ifrp = (struct ifreq *)((char *)ifrp + siz)) {
memcpy(ifrbuf, ifrp, sizeof(*ifrp));
- siz = ((struct ifreq *)ifrbuf)->ifr_addr.sa_len;
- if (siz < sizeof(ifrp->ifr_addr))
- siz = sizeof(ifrp->ifr_addr);
- siz += (sizeof(*ifrp) - sizeof(ifrp->ifr_addr));
+ ifr = (struct ifreq *)ifrbuf;
+ siz = ifr->ifr_addr.sa_len;
+ if (siz < sizeof(ifr->ifr_addr))
+ siz = sizeof(ifr->ifr_addr);
+ siz += (sizeof(*ifrp) - sizeof(ifr->ifr_addr));
if (siz > sizeof(ifrbuf)) {
/* ifr too big */
break;
}
memcpy(ifrbuf, ifrp, siz);
- ifr = (struct ifreq *)ifrbuf;
switch (ifr->ifr_addr.sa_family) {
case AF_INET:
Please sign in to comment.
Something went wrong with that request. Please try again.