]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
- Print null hardware address as blank, instead of as <null>.
authorTed Lemon <source@isc.org>
Tue, 16 Jan 2001 23:12:47 +0000 (23:12 +0000)
committerTed Lemon <source@isc.org>
Tue, 16 Jan 2001 23:12:47 +0000 (23:12 +0000)
- Use isc_result_totext to print ns update status, now that res_nupdate
  is returning an isc_result_t.

common/print.c

index 93e35825c6c7329585e366427cb1b7db5d58febc..7fd0ebeb7dc91b94c30f64288de7eb89d4d23bb7 100644 (file)
@@ -43,7 +43,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: print.c,v 1.47 2001/01/06 21:32:26 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: print.c,v 1.48 2001/01/16 23:12:47 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -57,9 +57,9 @@ char *print_hw_addr (htype, hlen, data)
        char *s;
        int i;
 
-       if (htype == 0 || hlen == 0) {
-               strcpy (habuf, "<null>");
-       else {
+       if (hlen == 0)
+               habuf [0] = 0;
+       else {
                s = habuf;
                for (i = 0; i < hlen; i++) {
                        sprintf (s, "%02x", data [i]);
@@ -1169,6 +1169,8 @@ void print_dns_status (int status, ns_updque *uq)
                s += strlen (s);
        }
        errorp = 1;
+       en = isc_result_totext (status);
+#if 0
        switch (status) {
              case -1:
                en = "resolver failed";
@@ -1223,6 +1225,7 @@ void print_dns_status (int status, ns_updque *uq)
                en = "unknown error";
                break;
        }
+#endif
 
        if (s + 2 < end) {
                *s++ = ':';