INN commit: trunk/backends (actsync.c)
INN Commit
rra at isc.org
Sat May 23 11:30:50 UTC 2015
Date: Saturday, May 23, 2015 @ 04:30:49
Author: iulius
Revision: 9872
backends/actsync.c: host argument to get_active can no longer be NULL
process_args() will call die() rather than let this happen. This
change cleans up the code to no longer assume that a null pointer is
a possibility.
Thanks to Richard Kettlewell for the patch.
Modified:
trunk/backends/actsync.c
-----------+
actsync.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
Modified: actsync.c
===================================================================
--- actsync.c 2015-05-17 17:23:43 UTC (rev 9871)
+++ actsync.c 2015-05-23 11:30:49 UTC (rev 9872)
@@ -703,7 +703,7 @@
* get_active - get an active file from a host
*
* given:
- * host host to contact or file to read, NULL => local server
+ * host host to contact or file to read
* hostid HOST_ID of host
* len pointer to length of grp return array
* grp existing host array to add, or NULL
@@ -742,7 +742,9 @@
if (len == NULL)
die("internal error #1: len is NULL");
if (errs == NULL)
- die("internal error #2: errs in NULL");
+ die("internal error #2: errs is NULL");
+ if (host == NULL)
+ die("internal error #10: host is NULL");
if (D_BUG)
warn("STATUS: obtaining active file from %s", host);
@@ -759,7 +761,7 @@
}
/* check for host being a filename */
- if (host != NULL && (host[0] == '/' || host[0] == '.')) {
+ if (host[0] == '/' || host[0] == '.') {
/* note that host is actually a file */
is_file = 1;
@@ -768,10 +770,10 @@
if ((qp = QIOopen(host)) == NULL)
sysdie("cannot open active file");
- /* case: host is a hostname or NULL (default server) */
+ /* case: host is a hostname */
} else {
- /* note that host is actually a hostname or NULL */
+ /* note that host is actually a hostname */
is_file = 0;
/* prepare remote host variables */
More information about the inn-committers
mailing list