From: Ted Lemon Date: Fri, 7 May 1999 17:38:42 +0000 (+0000) Subject: Fix up colon-seperated hex octet list parsing in parse_data_expression. X-Git-Tag: V3-ALPHA-19990507~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=be19167db22ac4d12cf36b378305170ca15714ed;p=thirdparty%2Fdhcp.git Fix up colon-seperated hex octet list parsing in parse_data_expression. --- diff --git a/common/parse.c b/common/parse.c index 3d960d26f..5951cca40 100644 --- a/common/parse.c +++ b/common/parse.c @@ -22,7 +22,7 @@ #ifndef lint static char copyright[] = -"$Id: parse.c,v 1.22 1999/05/06 20:20:43 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; +"$Id: parse.c,v 1.23 1999/05/07 17:38:42 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -1798,20 +1798,23 @@ int parse_non_binary (expr, cfile, lose, context) break; case NUMBER: - if (!expression_allocate (expr, - "parse_expression: NUMBER")) - log_fatal ("can't allocate expression"); - /* If we're in a numeric context, this should just be a number, by itself. */ if (context == context_numeric) { next_token (&val, cfile); /* Eat the number. */ + if (!expression_allocate (expr, + "parse_expression: NUMBER")) + log_fatal ("can't allocate expression"); (*expr) -> op = expr_const_int; (*expr) -> data.const_int = atoi (val); break; } case NUMBER_OR_NAME: + if (!expression_allocate (expr, + "parse_expression: NUMBER_OR_NAME")) + log_fatal ("can't allocate expression"); + (*expr) -> op = expr_const_data; if (!parse_cshl (&(*expr) -> data.const_data, cfile)) { expression_dereference (expr,