aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/libalias/alias_util.c
diff options
context:
space:
mode:
authorLuoqi Chen <luoqi@FreeBSD.org>1999-04-21 21:28:01 +0000
committerLuoqi Chen <luoqi@FreeBSD.org>1999-04-21 21:28:01 +0000
commit46d28b4462cd716e288a57423224bd2fb27609de (patch)
treee525753616bc03d6b0cd5637f5b3c63242419862 /sys/netinet/libalias/alias_util.c
parent65a74e454ede53565c78abaa19a233f2b3e2628a (diff)
downloadsrc-46d28b4462cd716e288a57423224bd2fb27609de.tar.gz
src-46d28b4462cd716e288a57423224bd2fb27609de.zip
Work around an egcs optimizer bug (i386). This should fix the active ftp
hang problem. A bug report has been sent to cygnus.
Notes
Notes: svn path=/head/; revision=45926
Diffstat (limited to 'sys/netinet/libalias/alias_util.c')
-rw-r--r--sys/netinet/libalias/alias_util.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/netinet/libalias/alias_util.c b/sys/netinet/libalias/alias_util.c
index fe0765312018..cb948c3385f6 100644
--- a/sys/netinet/libalias/alias_util.c
+++ b/sys/netinet/libalias/alias_util.c
@@ -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;
}