Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/libvfio-user.c
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,7 @@ prepare_ctx(vfu_ctx_t *vfu_ctx)
uint32_t max_ivs = 0, i;
size_t size;

if (vfu_ctx->ready != 0) {
if (vfu_ctx->ready) {
return 0;
}

Expand Down Expand Up @@ -1165,7 +1165,7 @@ prepare_ctx(vfu_ctx_t *vfu_ctx)
vfu_ctx->pci_config_space->hdr.sts.cl = 0x1;
vfu_ctx->pci_config_space->hdr.cap = PCI_STD_HEADER_SIZEOF;
}
vfu_ctx->ready = 1;
vfu_ctx->ready = true;

return 0;
}
Expand Down Expand Up @@ -1200,7 +1200,7 @@ vfu_ctx_poll(vfu_ctx_t *vfu_ctx)
return -ENOTSUP;
}

assert(vfu_ctx->ready == 1);
assert(vfu_ctx->ready);
err = process_request(vfu_ctx);

return err >= 0 ? 0 : err;
Expand Down
2 changes: 1 addition & 1 deletion lib/private.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ struct vfu_ctx {

uint32_t irq_count[VFU_DEV_NUM_IRQS];
vfu_irqs_t *irqs;
int ready;
bool ready;
vfu_dev_type_t dev_type;
vfu_pci_type_t pci_type;
};
Expand Down