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 1999-04-21 21:28:01 +00:00
parent c9ad0075c9
commit 6ea0e19959
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;
}