mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-09-01 14:55:30 +00:00
Clear the right data buffer. Add missing braces.
This commit is contained in:
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static char copyright[] =
|
||||||
"$Id: tree.c,v 1.13 1998/11/05 18:45:23 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. All rights reserved.\n";
|
"$Id: tree.c,v 1.14 1998/11/06 00:13:36 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
@@ -77,9 +77,10 @@ int make_const_option_cache (oc, buffer, data, len, option, name)
|
|||||||
*buffer = 0;
|
*buffer = 0;
|
||||||
} else {
|
} else {
|
||||||
bp = (struct buffer *)0;
|
bp = (struct buffer *)0;
|
||||||
if (!buffer_allocate (&bp, len, name))
|
if (!buffer_allocate (&bp, len, name)) {
|
||||||
warn ("%s: can't allocate buffer.", name);
|
warn ("%s: can't allocate buffer.", name);
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!option_cache_allocate (oc, name)) {
|
if (!option_cache_allocate (oc, name)) {
|
||||||
@@ -722,7 +723,7 @@ int evaluate_data_expression (result, packet, options, expr)
|
|||||||
memset (&data, 0, sizeof data);
|
memset (&data, 0, sizeof data);
|
||||||
s0 = evaluate_data_expression (&data, packet, options,
|
s0 = evaluate_data_expression (&data, packet, options,
|
||||||
expr -> data.concat [0]);
|
expr -> data.concat [0]);
|
||||||
memset (&data, 0, sizeof data);
|
memset (&other, 0, sizeof other);
|
||||||
s1 = evaluate_data_expression (&other, packet, options,
|
s1 = evaluate_data_expression (&other, packet, options,
|
||||||
expr -> data.concat [1]);
|
expr -> data.concat [1]);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user