Work around an egcs optimizer bug (i386). This should fix the active ftp

hang problem. A bug report has been sent to cygnus.
This commit is contained in:
Luoqi Chen 1999-04-21 21:28:01 +00:00
parent 65a74e454e
commit 46d28b4462
2 changed files with 8 additions and 4 deletions

View File

@ -43,7 +43,8 @@ PacketAliasInternetChecksum(u_short *ptr, int nbytes)
if (nbytes == 1)
{
oddbyte = 0;
*((u_char *) &oddbyte) = *(u_char *) ptr;
((u_char *) &oddbyte)[0] = *(u_char *) ptr;
((u_char *) &oddbyte)[1] = 0;
sum += oddbyte;
}
sum = (sum >> 16) + (sum & 0xffff);
@ -84,7 +85,8 @@ TcpChecksum(struct ip *pip)
if (nbytes == 1)
{
oddbyte = 0;
*((u_char *) &oddbyte) = *(u_char *) ptr;
((u_char *) &oddbyte)[0] = *(u_char *) ptr;
((u_char *) &oddbyte)[1] = 0;
sum += oddbyte;
}

View File

@ -43,7 +43,8 @@ PacketAliasInternetChecksum(u_short *ptr, int nbytes)
if (nbytes == 1)
{
oddbyte = 0;
*((u_char *) &oddbyte) = *(u_char *) ptr;
((u_char *) &oddbyte)[0] = *(u_char *) ptr;
((u_char *) &oddbyte)[1] = 0;
sum += oddbyte;
}
sum = (sum >> 16) + (sum & 0xffff);
@ -84,7 +85,8 @@ TcpChecksum(struct ip *pip)
if (nbytes == 1)
{
oddbyte = 0;
*((u_char *) &oddbyte) = *(u_char *) ptr;
((u_char *) &oddbyte)[0] = *(u_char *) ptr;
((u_char *) &oddbyte)[1] = 0;
sum += oddbyte;
}