From 9bca2b1515bf851b56b4a5d092a4fb9e269f98ea Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 5 Mar 2023 14:27:06 -0600 Subject: [PATCH] Dear gcc, please stop threatening me with a good time. (Yes, it will always be 1. That's what I WANT. The test is so that when it's 0, the 0 can be replaced. Before the !! it would also always have been one, but gcc wouldn't have complained about it. No obvious way to (shutup *) this one away, so danegeld the explicit 1.) --- toys/posix/cat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toys/posix/cat.c b/toys/posix/cat.c index 254f904d..1eb15d49 100644 --- a/toys/posix/cat.c +++ b/toys/posix/cat.c @@ -28,7 +28,7 @@ config CAT static void do_cat(int fd, char *name) { - int i, len, size = FLAG(u) ? : sizeof(toybuf); + int i, len, size = FLAG(u) ? 1 : sizeof(toybuf); for(;;) { len = read(fd, toybuf, size); -- 2.39.2