]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Swap shorts with htons, not htonl!
authorTed Lemon <source@isc.org>
Fri, 9 May 1997 07:58:33 +0000 (07:58 +0000)
committerTed Lemon <source@isc.org>
Fri, 9 May 1997 07:58:33 +0000 (07:58 +0000)
common/convert.c

index 64f3f15c2b6bf6fcf59c8a95b3f60096846a4735..9b5fcd7a261df435a4bfff5c0d9ccc38979e64cd 100644 (file)
@@ -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);
 }