From 5b610a06b297b162f3c63e139e33eb0ca9113f70 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 27 Jun 2008 16:34:00 +0200 Subject: avoid a -Wsign-compare warning * src/tee.c (tee_files): Swap fwrite's size/n_elem args and compare the return value against "1". --- src/tee.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tee.c b/src/tee.c index 162455c53..4e46aabb5 100644 --- a/src/tee.c +++ b/src/tee.c @@ -190,7 +190,7 @@ tee_files (int nfiles, const char **files) Standard output is the first one. */ for (i = 0; i <= nfiles; i++) if (descriptors[i] - && fwrite (buffer, 1, bytes_read, descriptors[i]) != bytes_read) + && fwrite (buffer, bytes_read, 1, descriptors[i]) != 1) { error (0, errno, "%s", files[i]); descriptors[i] = NULL; -- cgit v1.2.3-70-g09d2