summaryrefslogtreecommitdiff
path: root/lib/openat.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/openat.c')
-rw-r--r--lib/openat.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/openat.c b/lib/openat.c
index 6a1b42ea6..7df52ea13 100644
--- a/lib/openat.c
+++ b/lib/openat.c
@@ -56,10 +56,9 @@ openat (int fd, char const *file, int flags, ...)
/* If mode_t is narrower than int, use the promoted type (int),
not mode_t. Use sizeof to guess whether mode_t is narrower;
we don't know of any practical counterexamples. */
- if (sizeof (mode_t) < sizeof (int))
- mode = va_arg (arg, int);
- else
- mode = va_arg (arg, mode_t);
+ mode = (sizeof (mode_t) < sizeof (int)
+ ? va_arg (arg, int)
+ : va_arg (arg, mode_t));
va_end (arg);
}