null machine list same as no list.
authorRalph Campbell <ralph@ucbvax.Berkeley.EDU>
Wed, 6 Feb 1985 01:50:58 +0000 (17:50 -0800)
committerRalph Campbell <ralph@ucbvax.Berkeley.EDU>
Wed, 6 Feb 1985 01:50:58 +0000 (17:50 -0800)
SCCS-vsn: usr.bin/rdist/docmd.c 4.24

usr/src/usr.bin/rdist/docmd.c

index 302838f..1d8aa99 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)docmd.c     4.23 (Berkeley) 85/02/04";
+static char *sccsid = "@(#)docmd.c     4.24 (Berkeley) 85/02/05";
 #endif
 
 #include "defs.h"
 #endif
 
 #include "defs.h"
@@ -35,7 +35,7 @@ docmds(dhosts, argc, argv)
        signal(SIGTERM, cleanup);
 
        for (c = cmds; c != NULL; c = c->c_next) {
        signal(SIGTERM, cleanup);
 
        for (c = cmds; c != NULL; c = c->c_next) {
-               if (dhosts != NULL) {
+               if (dhosts != NULL && *dhosts != NULL) {
                        for (cpp = dhosts; *cpp; cpp++)
                                if (strcmp(c->c_name, *cpp) == 0)
                                        goto fndhost;
                        for (cpp = dhosts; *cpp; cpp++)
                                if (strcmp(c->c_name, *cpp) == 0)
                                        goto fndhost;