Changes needed to use check_for_hostspec() in place of find_colon().
authorWayne Davison <wayned@samba.org>
Tue, 1 Mar 2005 01:15:59 +0000 (01:15 +0000)
committerWayne Davison <wayned@samba.org>
Tue, 1 Mar 2005 01:15:59 +0000 (01:15 +0000)
batch.c

diff --git a/batch.c b/batch.c
index 657c9c0..88dad3c 100644 (file)
--- a/batch.c
+++ b/batch.c
@@ -179,10 +179,7 @@ void write_batch_shell_file(int argc, char *argv[], int file_arg_cnt)
                } else
                        write_arg(fd, p);
        }
-       if ((p = find_colon(argv[argc - 1])) != NULL) {
-               if (*++p == ':')
-                       p++;
-       } else
+       if (!(p = check_for_hostspec(argv[argc - 1], &p, &i)))
                p = argv[argc - 1];
        write(fd, " ${1:-", 6);
        write_arg(fd, p);