diff options
-rw-r--r-- | lib/openat.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/openat.c b/lib/openat.c index 929d26492..092e39610 100644 --- a/lib/openat.c +++ b/lib/openat.c @@ -55,11 +55,8 @@ rpl_openat (int fd, char const *file, int flags, ...) { va_list arg; va_start (arg, flags); - - /* Assume that mode_t is passed compatibly with mode_t's type - after argument promotion. */ - mode = va_arg (arg, mode_t); - + /* Use the promoted type (int), not mode_t, as second argument. */ + mode = (mode_t) va_arg (arg, int); va_end (arg); } |