diff options
author | David Hankins <dhankins@isc.org> | 2007-05-11 15:51:07 +0000 |
---|---|---|
committer | David Hankins <dhankins@isc.org> | 2007-05-11 15:51:07 +0000 |
commit | d8c4704a75733973777d7bd29245808c0b4bb8e6 (patch) | |
tree | fea3a8175d9d8253555b2f43940fd73b30173764 | |
parent | c25d3b84b76982894a6c71a02532fcc91f5e836d (diff) | |
download | isc-dhcp-d8c4704a75733973777d7bd29245808c0b4bb8e6.tar.gz |
- Corrected one situation where the column index variable might be
used without being initialized, in expression-printing. [ISC-Bugs #16865b]
- Silenced several other compiler warnings. [ISC-Bugs #16865b]
-rw-r--r-- | RELNOTES | 5 | ||||
-rw-r--r-- | common/execute.c | 10 | ||||
-rw-r--r-- | common/options.c | 10 |
3 files changed, 15 insertions, 10 deletions
@@ -52,6 +52,11 @@ the README file. - A bug was repaired in subencapsulation support, where spaces separated by empty spaces would not get included. +- Corrected one situation where the column index variable might be + used without being initialized, in expression-printing. + +- Silenced several other compiler warnings. + Changes since 3.1.0a3 - The execute() statement has been changed from a "numeric expression" to diff --git a/common/execute.c b/common/execute.c index dde2d58b..978b6a52 100644 --- a/common/execute.c +++ b/common/execute.c @@ -34,7 +34,7 @@ #ifndef lint static char copyright[] = -"$Id: execute.c,v 1.48.116.2 2007/02/14 22:41:22 dhankins Exp $ Copyright (c) 2004-2007 Internet Systems Consortium. All rights reserved.\n"; +"$Id: execute.c,v 1.48.116.3 2007/05/11 15:51:07 dhankins Exp $ Copyright (c) 2004-2007 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); diff --git a/common/options.c b/common/options.c index ef88abdf..37d71b06 100644 --- a/common/options.c +++ b/common/options.c @@ -34,7 +34,7 @@ #ifndef lint static char copyright[] = -"$Id: options.c,v 1.98.2.8 2007/04/12 16:16:14 dhankins Exp $ Copyright (c) 2004-2007 Internet Systems Consortium. All rights reserved.\n"; +"$Id: options.c,v 1.98.2.9 2007/05/11 15:51:07 dhankins Exp $ Copyright (c) 2004-2007 Internet Systems Consortium. All rights reserved.\n"; #endif /* not lint */ #define DHCP_OPTION_DATA @@ -1545,11 +1545,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': @@ -1557,7 +1557,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': |