2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-22 09:57:20 +00:00

- Corrected some situations where variables might be used without being

initialized. [ISC-Bugs #16865]

- Silenced several other compiler warnings. [ISC-Bugs #16865]

- Include the more standard sys/uio.h rather than rely upon other header
  files to include it (fixes a BSDI compile failure). [ISC-Bugs #16865]
This commit is contained in:
David Hankins 2007-05-11 15:50:18 +00:00
parent 98bd7ca099
commit a512d11b6d
6 changed files with 30 additions and 15 deletions

View File

@ -54,6 +54,14 @@ the README file.
- An obviated option code hash lookup to find D6O_CLIENTID was removed.
- Corrected some situations where variables might be used without being
initialized.
- Silenced several other compiler warnings.
- Include the more standard sys/uio.h rather than rely upon other
header files to include it (fixes a BSDI compile failure).
Changes since 3.1.0 (NEW FEATURES)
- DHCPv6 Client and Server protocol support. Use '-6' to run the daemons

View File

@ -34,7 +34,7 @@
#ifndef lint
static char copyright[] =
"$Id: execute.c,v 1.49 2007/01/28 23:00:19 each Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
"$Id: execute.c,v 1.50 2007/05/11 15:50:18 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@ -796,7 +796,7 @@ void write_statements (file, statements, indent)
indent_spaces (file, indent);
fprintf (file, "}");
break;
case case_statement:
indent_spaces (file, indent - 1);
fprintf (file, "case ");
@ -806,7 +806,7 @@ void write_statements (file, statements, indent)
token_print_indent (file, col, indent + 5,
"", "", ":");
break;
case default_statement:
indent_spaces (file, indent - 1);
fprintf (file, "default: ");
@ -975,8 +975,8 @@ void write_statements (file, statements, indent)
case execute_statement:
#ifdef ENABLE_EXECUTE
indent_spaces (file, indent);
col = token_print_indent(file, col, indent + 4, "", "",
"execute");
col = token_print_indent(file, indent + 4, indent + 4,
"", "", "execute");
col = token_print_indent(file, col, indent + 4, " ", "",
"(");
col = token_print_indent(file, col, indent + 4, "\"", "\"", r->data.execute.command);

View File

@ -34,7 +34,7 @@
#ifndef lint
static char copyright[] =
"$Id: options.c,v 1.106 2007/05/08 23:05:20 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
"$Id: options.c,v 1.107 2007/05/11 15:50:18 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#define DHCP_OPTION_DATA
@ -177,12 +177,16 @@ int parse_option_buffer (options, buffer, length, universe)
len = universe->get_length(buffer + offset);
else if (universe->length_size == 0)
len = length - universe->tag_size;
else
else {
log_fatal("Improperly configured option space(%s): "
"may not have a nonzero length size "
"AND a NULL get_length function.",
universe->name);
/* Silence compiler warnings. */
return 0;
}
offset += universe->length_size;
option_code_hash_lookup(&option, universe->code_hash, &code,
@ -1851,6 +1855,7 @@ const char *pretty_print_option (option, data, len, emit_commas, emit_quotes)
default:
log_fatal("Impossible case at %s:%d.",
MDL);
return "<double impossible condition>";
}
for (i = 0; ;i++) {
@ -1865,7 +1870,7 @@ const char *pretty_print_option (option, data, len, emit_commas, emit_quotes)
break;
enum_as_num:
sprintf(op, "%u", tval);
sprintf(op, "%lu", tval);
break;
case 'I':
@ -1889,11 +1894,11 @@ const char *pretty_print_option (option, data, len, emit_commas, emit_quotes)
if (tval == -1)
sprintf (op, "%s", "infinite");
else
sprintf (op, "%ld", tval);
sprintf(op, "%lu", tval);
break;
case 'L':
sprintf (op, "%ld",
(unsigned long)getULong (dp));
sprintf(op, "%lu",
(unsigned long)getULong(dp));
dp += 4;
break;
case 's':
@ -1901,7 +1906,7 @@ const char *pretty_print_option (option, data, len, emit_commas, emit_quotes)
dp += 2;
break;
case 'S':
sprintf (op, "%d", (unsigned)getUShort (dp));
sprintf(op, "%u", (unsigned)getUShort(dp));
dp += 2;
break;
case 'b':

View File

@ -34,7 +34,7 @@
#ifndef lint
static char copyright[] =
"$Id: parse.c,v 1.121 2007/05/08 23:05:20 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
"$Id: parse.c,v 1.122 2007/05/11 15:50:18 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@ -1562,7 +1562,7 @@ int parse_option_code_definition (cfile, option)
encapsulated = NULL;
if (!universe_hash_lookup(&encapsulated, universe_hash,
val, strlen(val), MDL)) {
parse_warn(cfile, "unknown option space %s", s);
parse_warn(cfile, "unknown option space %s", val);
skip_to_semi (cfile);
return 0;
}

View File

@ -42,11 +42,12 @@
#ifndef lint
static char copyright[] =
"$Id: socket.c,v 1.60 2007/05/08 23:05:20 dhankins Exp $ "
"$Id: socket.c,v 1.61 2007/05/11 15:50:18 dhankins Exp $ "
"Copyright (c) 2004-2006 Internet Systems Consortium.\n";
#endif /* not lint */
#include "dhcpd.h"
#include <sys/uio.h>
#ifdef USE_SOCKET_FALLBACK
# if !defined (USE_SOCKET_SEND)

View File

@ -50,6 +50,7 @@ int MRns_name_compress(const char *, u_char *, size_t, const unsigned char **,
int MRns_name_unpack(const unsigned char *, const unsigned char *,
const unsigned char *, unsigned char *, size_t);
int MRns_name_ntop(const unsigned char *, char *, size_t);
int MRns_name_pton(const char *, u_char *, size_t);
#if defined (MINIRES_LIB)
#define res_update minires_update