From 3dae8ebfe590a1b3ae86d2dc9d3e206357fd2eba Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Thu, 25 Aug 2022 21:01:53 -0500 Subject: [PATCH] Some headers define stdin as a macro, avoid unnecessarily stepping on that. --- lib/xwrap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/xwrap.c b/lib/xwrap.c index 91264ea5..721bbf2c 100644 --- a/lib/xwrap.c +++ b/lib/xwrap.c @@ -382,15 +382,15 @@ int xrun(char **argv) return xpclose_both(xpopen_both(argv, 0), 0); } -// Run child, writing "stdin", returning stdout or NULL, pass through stderr -char *xrunread(char *argv[], char *stdin) +// Run child, writing to_stdin, returning stdout or NULL, pass through stderr +char *xrunread(char *argv[], char to_stdin) { char *result = 0; int pipe[] = {-1, -1}, total = 0, len; pid_t pid; pid = xpopen_both(argv, pipe); - if (stdin && *stdin) writeall(*pipe, stdin, strlen(stdin)); + if (to_stdin && *to_stdin) writeall(*pipe, tos_tdin, strlen(to_stdin)); close(*pipe); for (;;) { if (0>=(len = readall(pipe[1], libbuf, sizeof(libbuf)))) break; -- 2.39.2