From dd155a3ba5aae70c0bc0590fd82ed5d7e3a76a22 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Thu, 12 Sep 2019 21:56:46 -0500 Subject: Minor cleanup. --- toys/posix/head.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'toys') diff --git a/toys/posix/head.c b/toys/posix/head.c index 38ab919e..ab8467e4 100644 --- a/toys/posix/head.c +++ b/toys/posix/head.c @@ -34,15 +34,15 @@ GLOBALS( static void do_head(int fd, char *name) { - int i, len, lines=TT.n, bytes=TT.c; + long i, len, lines=TT.n, bytes=TT.c; - if ((toys.optc > 1 && !(toys.optflags & FLAG_q)) || toys.optflags & FLAG_v) { + if ((toys.optc > 1 && !FLAG(q)) || FLAG(v)) { // Print an extra newline for all but the first file if (TT.file_no) xprintf("\n"); xprintf("==> %s <==\n", name); } - while ((toys.optflags&FLAG_c) ? bytes : lines) { + while (FLAG(c) ? bytes : lines) { len = read(fd, toybuf, sizeof(toybuf)); if (len<0) perror_msg_raw(name); if (len<1) break; -- cgit v1.2.3