about summary refs log tree commit diff
path: root/pipeto.c
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2017-10-06 13:15:28 +0200
committerLeah Neukirchen <leah@vuxu.org>2017-10-06 13:15:28 +0200
commit5f45b7d53361bd32ce390e12f814660a98f86aa9 (patch)
tree53612a69e99fcb3c30392e9b682da3b0ff844f3e /pipeto.c
parentce9ac3aff4bd2fe58132c3ec194269abe4fda4a7 (diff)
downloadmblaze-5f45b7d53361bd32ce390e12f814660a98f86aa9.tar.gz
mblaze-5f45b7d53361bd32ce390e12f814660a98f86aa9.tar.xz
mblaze-5f45b7d53361bd32ce390e12f814660a98f86aa9.zip
use appropriate integer types
Mainly found with clang -Wconversion -Wshorten-64-to-32.
Diffstat (limited to 'pipeto.c')
-rw-r--r--pipeto.c4
1 files changed, 2 insertions, 2 deletions
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;