Common parser code for dhcpd and dhclient. */
/*
- * Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004-2006 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1995-2003 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
#ifndef lint
static char copyright[] =
-"$Id: parse.c,v 1.106 2005/03/17 20:14:59 dhankins Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
+"$Id: parse.c,v 1.107 2006/02/24 23:16:28 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
{
const char *val;
enum dhcp_token token;
+ u_int32_t num;
token = next_token (&val, (unsigned *)0, cfile);
if (token != NUMBER) {
skip_to_semi (cfile);
return;
}
- convert_num (cfile, (unsigned char *)timep, val, 10, 32);
+ convert_num(cfile, (unsigned char *)&num, val, 10, 32);
/* Unswap the number - convert_num returns stuff in NBO. */
- *timep = ntohl (*timep); /* XXX */
+ *timep = ntohl(num);
parse_semi (cfile);
}