From 31cb5fc41086f5b2903f473f85e6305bf47cfa2c Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Tue, 3 Nov 2015 05:17:14 -0600 Subject: Whitespace and parentheses. --- toys/other/flock.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/toys/other/flock.c b/toys/other/flock.c index 1d56a568..5f0190a9 100644 --- a/toys/other/flock.c +++ b/toys/other/flock.c @@ -25,13 +25,12 @@ config FLOCK void flock_main(void) { - int fd = xstrtol(*toys.optargs, NULL, 10); - int op; + int fd = xstrtol(*toys.optargs, NULL, 10), op; - if ((toys.optflags & FLAG_u)) op = LOCK_UN; + if (toys.optflags & FLAG_u) op = LOCK_UN; else op = (toys.optflags & FLAG_s) ? LOCK_SH : LOCK_EX; - if ((toys.optflags & FLAG_n)) op |= LOCK_NB; + if (toys.optflags & FLAG_n) op |= LOCK_NB; if (flock(fd, op)) { if ((op & LOCK_NB) && errno == EAGAIN) toys.exitval = 1; -- cgit v1.2.3