diff --git a/lib/libutil/flopen.c b/lib/libutil/flopen.c index 92254cc1c3cf..b99055ea7bc1 100644 --- a/lib/libutil/flopen.c +++ b/lib/libutil/flopen.c @@ -63,7 +63,7 @@ flopen(const char *path, int flags, ...) operation |= LOCK_NB; truncate = (flags & O_TRUNC); - flags |= ~O_TRUNC; + flags &= ~O_TRUNC; for (;;) { if ((fd = open(path, flags, mode)) == -1)