From 5f45b7d53361bd32ce390e12f814660a98f86aa9 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Fri, 6 Oct 2017 13:15:28 +0200 Subject: use appropriate integer types Mainly found with clang -Wconversion -Wshorten-64-to-32. --- pipeto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pipeto.c') diff --git a/pipeto.c b/pipeto.c index 4392548..c2bae0c 100644 --- a/pipeto.c +++ b/pipeto.c @@ -57,14 +57,14 @@ pipeto(const char *cmdline) errno = EINVAL; // execvp failed, write errno to parent - long e = errno; + int e = errno; if (write(pipe1[1], &e, sizeof e) < 0) exit(111); // do a magic dance for gcc -Wunused-result exit(111); } else { // in parent close(pipe1[1]); - long e; + int e; ssize_t n = read(pipe1[0], &e, sizeof e); if (n < 0) e = errno; -- cgit 1.4.1