Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/dist/dhcp gcc-4.5 fixes



details:   https://anonhg.NetBSD.org/src/rev/9a1d962d9d0c
branches:  trunk
changeset: 768433:9a1d962d9d0c
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Aug 16 16:36:38 2011 +0000

description:
gcc-4.5 fixes

diffstat:

 dist/dhcp/common/dns.c      |  15 ++++++++++-----
 dist/dhcp/dhcpctl/omshell.c |   4 ++--
 dist/dhcp/server/ddns.c     |   4 ++--
 3 files changed, 14 insertions(+), 9 deletions(-)

diffs (82 lines):

diff -r d22bc182cdfd -r 9a1d962d9d0c dist/dhcp/common/dns.c
--- a/dist/dhcp/common/dns.c    Tue Aug 16 16:25:15 2011 +0000
+++ b/dist/dhcp/common/dns.c    Tue Aug 16 16:36:38 2011 +0000
@@ -33,7 +33,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: dns.c,v 1.6 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium.  All rights reserved.\n";
+"$Id: dns.c,v 1.7 2011/08/16 16:36:38 christos Exp $ Copyright (c) 2004 Internet Systems Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -713,18 +713,23 @@
        result = minires_nupdate (&resolver_state, ISC_LIST_HEAD (updqueue));
 
        if (result != ISC_R_SUCCESS) {
-               if (result == YXRRSET || result == YXDOMAIN ||
-                   result == NXRRSET || result == NXDOMAIN)
+               switch ((ns_rcode)result) {
+               case YXRRSET:
+               case YXDOMAIN:
+               case NXRRSET:
+               case NXDOMAIN:
                        log_error ("Forward map from %.*s to %s already in use",
                                   (int)ddns_fwd_name -> len,
                                   (const char *)ddns_fwd_name -> data,
                                   ddns_address);
-               else
+                       break;
+               default:
                        log_error ("Can't update forward map %.*s to %s: %s",
                                   (int)ddns_fwd_name -> len,
                                   (const char *)ddns_fwd_name -> data,
                                   ddns_address, isc_result_totext (result));
-
+                       break;
+               }
        } else {
                log_info ("Added new forward map from %.*s to %s",
                          (int)ddns_fwd_name -> len,
diff -r d22bc182cdfd -r 9a1d962d9d0c dist/dhcp/dhcpctl/omshell.c
--- a/dist/dhcp/dhcpctl/omshell.c       Tue Aug 16 16:25:15 2011 +0000
+++ b/dist/dhcp/dhcpctl/omshell.c       Tue Aug 16 16:36:38 2011 +0000
@@ -34,7 +34,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: omshell.c,v 1.5 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium.  All rights reserved.\n";
+"$Id: omshell.c,v 1.6 2011/08/16 16:36:38 christos Exp $ Copyright (c) 2004 Internet Systems Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include <time.h>
@@ -182,7 +182,7 @@
            check(status, "new_parse()");
            
            token = next_token (&val, (unsigned *)0, cfile);
-           switch (token) {
+           switch ((int)token) {
                  default:
                    parse_warn (cfile, "unknown token: %s", val);
                    skip_to_semi (cfile);
diff -r d22bc182cdfd -r 9a1d962d9d0c dist/dhcp/server/ddns.c
--- a/dist/dhcp/server/ddns.c   Tue Aug 16 16:25:15 2011 +0000
+++ b/dist/dhcp/server/ddns.c   Tue Aug 16 16:36:38 2011 +0000
@@ -34,7 +34,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: ddns.c,v 1.7 2005/08/11 17:13:30 drochner Exp $ Copyright (c) 2004-2005 Internet Systems Consortium.  All rights reserved.\n";
+"$Id: ddns.c,v 1.8 2011/08/16 16:36:38 christos Exp $ Copyright (c) 2004-2005 Internet Systems Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -724,7 +724,7 @@
              try_rev:
                if (find_bound_string (&ddns_rev_name,
                                       lease -> scope, "ddns-rev-name")) {
-                       if (ddns_remove_ptr(&ddns_rev_name) == NOERROR) {
+                       if ((ns_rcode)ddns_remove_ptr(&ddns_rev_name) == NOERROR) {
                                unset (lease -> scope, "ddns-rev-name");
                                if (client_updated)
                                        unset (lease -> scope,



Home | Main Index | Thread Index | Old Index