#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"
unsigned char *obuf;
u_int16_t val;
{
- u_int16_t tmp = htonl (val);
+ u_int16_t tmp = htons (val);
memcpy (obuf, &tmp, sizeof tmp);
}
unsigned char *obuf;
int16_t val;
{
- int16_t tmp = htonl (val);
+ int16_t tmp = htons (val);
memcpy (obuf, &tmp, sizeof tmp);
}