|
@@ -233,14 +233,18 @@ void qemu_set_block(int fd)
|
|
|
{
|
|
|
int f;
|
|
|
f = fcntl(fd, F_GETFL);
|
|
|
- fcntl(fd, F_SETFL, f & ~O_NONBLOCK);
|
|
|
+ assert(f != -1);
|
|
|
+ f = fcntl(fd, F_SETFL, f & ~O_NONBLOCK);
|
|
|
+ assert(f != -1);
|
|
|
}
|
|
|
|
|
|
void qemu_set_nonblock(int fd)
|
|
|
{
|
|
|
int f;
|
|
|
f = fcntl(fd, F_GETFL);
|
|
|
- fcntl(fd, F_SETFL, f | O_NONBLOCK);
|
|
|
+ assert(f != -1);
|
|
|
+ f = fcntl(fd, F_SETFL, f | O_NONBLOCK);
|
|
|
+ assert(f != -1);
|
|
|
}
|
|
|
|
|
|
int socket_set_fast_reuse(int fd)
|