From: Ted Lemon Date: Fri, 9 May 1997 07:58:33 +0000 (+0000) Subject: Swap shorts with htons, not htonl! X-Git-Tag: DHCP-970602~52 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=46809edfef0ef38115dfceb2cc1686550d238a24;p=thirdparty%2Fdhcp.git Swap shorts with htons, not htonl! --- diff --git a/common/convert.c b/common/convert.c index 64f3f15c2..9b5fcd7a2 100644 --- a/common/convert.c +++ b/common/convert.c @@ -43,7 +43,7 @@ #ifndef lint static char copyright[] = -"$Id: convert.c,v 1.3 1996/08/27 09:41:28 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; +"$Id: convert.c,v 1.4 1997/05/09 07:58:33 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -104,7 +104,7 @@ void putUShort (obuf, val) unsigned char *obuf; u_int16_t val; { - u_int16_t tmp = htonl (val); + u_int16_t tmp = htons (val); memcpy (obuf, &tmp, sizeof tmp); } @@ -112,7 +112,7 @@ void putShort (obuf, val) unsigned char *obuf; int16_t val; { - int16_t tmp = htonl (val); + int16_t tmp = htons (val); memcpy (obuf, &tmp, sizeof tmp); }