Use a separate pass-by-value pointer for clarity.
authorWayne Davison <wayned@samba.org>
Tue, 15 Jan 2019 18:41:42 +0000 (10:41 -0800)
committerWayne Davison <wayned@samba.org>
Tue, 15 Jan 2019 18:46:29 +0000 (10:46 -0800)
batch.c

diff --git a/batch.c b/batch.c
index 21c632f..1ab66e9 100644 (file)
--- a/batch.c
+++ b/batch.c
@@ -216,7 +216,7 @@ static void write_filter_rules(int fd)
 void write_batch_shell_file(int argc, char *argv[], int file_arg_cnt)
 {
        int fd, i, len, err = 0;
-       char *p, filename[MAXPATHLEN];
+       char *p, *p2, filename[MAXPATHLEN];
 
        stringjoin(filename, sizeof filename,
                   batch_name, ".sh", NULL);
@@ -267,7 +267,7 @@ void write_batch_shell_file(int argc, char *argv[], int file_arg_cnt)
                                err = 1;
                }
        }
-       if (!(p = check_for_hostspec(argv[argc - 1], &p, &i)))
+       if (!(p = check_for_hostspec(argv[argc - 1], &p2, &i)))
                p = argv[argc - 1];
        if (write(fd, " ${1:-", 6) != 6
         || write_arg(fd, p) < 0)