aboutsummaryrefslogtreecommitdiff
path: root/lib/interestingtimes.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2018-10-10 06:36:12 -0500
committerRob Landley <rob@landley.net>2018-10-10 06:36:12 -0500
commit9492c7fce507cd5cd5172d6e2bf2b86573198806 (patch)
treef443233d93092b5058af4525b30ee68d5f3fa5c4 /lib/interestingtimes.c
parentc349e6f2e19281903fd8666cfeafe2f081fef66a (diff)
downloadtoybox-9492c7fce507cd5cd5172d6e2bf2b86573198806.tar.gz
Rewrite of watch.
Diffstat (limited to 'lib/interestingtimes.c')
-rw-r--r--lib/interestingtimes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/interestingtimes.c b/lib/interestingtimes.c
index 636964aa..c3ed9f9a 100644
--- a/lib/interestingtimes.c
+++ b/lib/interestingtimes.c
@@ -216,8 +216,8 @@ int scan_key(char *scratch, int miliwait)
// Read 1 byte so we don't overshoot sequence match. (We can deviate
// and fail to match, but match consumes entire buffer.)
- if (toys.signal || 1 != read(0, scratch+1+*scratch, 1))
- return toys.signal ? -3 : -1;
+ if (toys.signal>0 || 1 != read(0, scratch+1+*scratch, 1))
+ return (toys.signal>0) ? -3 : -1;
++*scratch;
}