فهرست منبع

exec_close(): accept any negative value as qemu_fclose() error

Note that we don't return the unchanged return value back yet, because
we need to change all qemu_fclose() callers to accept any positive value
as success.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Eduardo Habkost 13 سال پیش
والد
کامیت
ce812673dc
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      migration-exec.c

+ 1 - 1
migration-exec.c

@@ -50,7 +50,7 @@ static int exec_close(MigrationState *s)
         ret = qemu_fclose(s->opaque);
         ret = qemu_fclose(s->opaque);
         s->opaque = NULL;
         s->opaque = NULL;
         s->fd = -1;
         s->fd = -1;
-        if (ret != -1 &&
+        if (ret >= 0 &&
             WIFEXITED(ret)
             WIFEXITED(ret)
             && WEXITSTATUS(ret) == 0) {
             && WEXITSTATUS(ret) == 0) {
             ret = 0;
             ret = 0;