Skip to contentSkip to conversation

libxl_qmp, Fix return check of fcntl

PATCH New Anthony PERARD 1 participant 1 message Oct 7, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxl_qmp, Fix return check of fcntl

---
 tools/libxl/libxl_qmp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
tools/libxl/libxl_qmp.c +1 -1
index f38d4b4..34db29f 100644
@@ -296,7 +296,7 @@ static int qmp_open(libxl__qmp_handler *qmp, const char *qmp_socket_path,
     if (qmp->qmp_fd < 0) {
         return -1;
     }
-    if ((flags = fcntl(qmp->qmp_fd, F_GETFL)) == 1) {
+    if ((flags = fcntl(qmp->qmp_fd, F_GETFL)) == -1) {
         flags = 0;
     }
     if (fcntl(qmp->qmp_fd, F_SETFL, flags | O_NONBLOCK) == -1) {
Signature · 1 line
Anthony PERARD