gcc 4 fix. Networking team, please check whether this preserves the intended

semantics.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14871 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2005-11-12 18:48:54 +00:00
parent 56436a1ab8
commit 8c8e8b994e

View File

@ -489,8 +489,10 @@ int main(int argc, char **argv)
*p++ = lsrrlen - 1;
*p++ = IPOPT_MINOFF;
gateway[lsrr] = to.sin_addr;
for (i = 1; i <= lsrr; i++)
*((struct in_addr *)p)++ = gateway[i];
for (i = 1; i <= lsrr; i++) {
*(struct in_addr *)p = gateway[i];
p = (u_char*)((struct in_addr *)p + 1);
}
ip->ip_dst = gateway[0];
} else
ip->ip_dst = to.sin_addr;