aboutsummaryrefslogtreecommitdiff
path: root/toys/posix/strings.c
diff options
context:
space:
mode:
Diffstat (limited to 'toys/posix/strings.c')
-rw-r--r--toys/posix/strings.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/toys/posix/strings.c b/toys/posix/strings.c
index e33ae960..816280b0 100644
--- a/toys/posix/strings.c
+++ b/toys/posix/strings.c
@@ -66,9 +66,8 @@ static void do_strings(int fd, char *filename)
else {
string[count++] = toybuf[i];
if (count == wlen) {
- if (toys.optflags & FLAG_f) printf("%s: ", filename);
- if (toys.optflags & (FLAG_o|FLAG_t))
- printf(pattern, (long long)(offset - wlen));
+ if (FLAG(f)) printf("%s: ", filename);
+ if (FLAG(o) || FLAG(t)) printf(pattern, (long long)(offset - wlen));
printf("%s", string);
}
}