From: Wayne Davison Date: Tue, 15 Jan 2019 18:41:42 +0000 (-0800) Subject: Use a separate pass-by-value pointer for clarity. X-Git-Tag: v3.2.0pre1~212 X-Git-Url: http://git.samba.org/samba.git/?p=rsync.git;a=commitdiff_plain;h=b3d12c5a3ddbe8754c66d981bd7eb2f2c006f9fa Use a separate pass-by-value pointer for clarity. --- diff --git a/batch.c b/batch.c index 21c632fc..1ab66e90 100644 --- 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)