diff options
-rw-r--r-- | util/oslib-posix.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/util/oslib-posix.c b/util/oslib-posix.c index 7e28c161b2..048d40d9de 100644 --- a/util/oslib-posix.c +++ b/util/oslib-posix.c @@ -182,7 +182,9 @@ void qemu_set_cloexec(int fd) { int f; f = fcntl(fd, F_GETFD); - fcntl(fd, F_SETFD, f | FD_CLOEXEC); + assert(f != -1); + f = fcntl(fd, F_SETFD, f | FD_CLOEXEC); + assert(f != -1); } /* |