Use a separate pass-by-value pointer for clarity.

This commit is contained in:
Wayne Davison
2019-01-15 10:41:42 -08:00
parent bc7402aa3a
commit b3d12c5a3d

View File

@@ -216,7 +216,7 @@ static void write_filter_rules(int fd)
void write_batch_shell_file(int argc, char *argv[], int file_arg_cnt) void write_batch_shell_file(int argc, char *argv[], int file_arg_cnt)
{ {
int fd, i, len, err = 0; int fd, i, len, err = 0;
char *p, filename[MAXPATHLEN]; char *p, *p2, filename[MAXPATHLEN];
stringjoin(filename, sizeof filename, stringjoin(filename, sizeof filename,
batch_name, ".sh", NULL); batch_name, ".sh", NULL);
@@ -267,7 +267,7 @@ void write_batch_shell_file(int argc, char *argv[], int file_arg_cnt)
err = 1; 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]; p = argv[argc - 1];
if (write(fd, " ${1:-", 6) != 6 if (write(fd, " ${1:-", 6) != 6
|| write_arg(fd, p) < 0) || write_arg(fd, p) < 0)