aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2019-09-12 21:56:46 -0500
committerRob Landley <rob@landley.net>2019-09-12 21:56:46 -0500
commitdd155a3ba5aae70c0bc0590fd82ed5d7e3a76a22 (patch)
tree0bd3b257f02b6f5129ff7f49c147e19d332e3542
parentf096460edaf2f50dbeadc3dd9e5ef7f9d50e3792 (diff)
downloadtoybox-dd155a3ba5aae70c0bc0590fd82ed5d7e3a76a22.tar.gz
Minor cleanup.
-rw-r--r--toys/posix/head.c6
1 files changed, 3 insertions, 3 deletions
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;