From: Ted Lemon Date: Tue, 16 Jan 2001 23:12:47 +0000 (+0000) Subject: - Print null hardware address as blank, instead of as . X-Git-Tag: V3-BETA-2-PATCH-12~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4cb55919c26e1e0c6ff9d66a7f732d6e617f49a9;p=thirdparty%2Fdhcp.git - Print null hardware address as blank, instead of as . - Use isc_result_totext to print ns update status, now that res_nupdate is returning an isc_result_t. --- diff --git a/common/print.c b/common/print.c index 93e35825c..7fd0ebeb7 100644 --- a/common/print.c +++ b/common/print.c @@ -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, ""); - } 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++ = ':';