diff options
author | Thanos Makatos <thanos.makatos@nutanix.com> | 2020-12-01 10:17:20 -0500 |
---|---|---|
committer | Thanos <tmakatos@gmail.com> | 2020-12-01 15:41:25 +0000 |
commit | 892de236f336f5cee84a864da2639e7c64998e98 (patch) | |
tree | 30a70bb30028d0a1d8735ee4af17eab17c346fa7 /lib/irq.c | |
parent | 2bf85d990fd93abd2076438040406fa33b1e1e01 (diff) | |
download | libvfio-user-892de236f336f5cee84a864da2639e7c64998e98.zip libvfio-user-892de236f336f5cee84a864da2639e7c64998e98.tar.gz libvfio-user-892de236f336f5cee84a864da2639e7c64998e98.tar.bz2 |
drop unnecessary restore_fd
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'lib/irq.c')
-rw-r--r-- | lib/irq.c | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -171,14 +171,12 @@ irqs_set_data_eventfd(vfu_ctx_t *vfu_ctx, struct vfio_irq_set *irq_set, vfu_ctx->irqs->efds[i] = -1; } - if (data[j] >= 0) { /* TODO IIUC this will always be >= 0? */ - vfu_ctx->irqs->efds[i] = data[j]; - /* - * We've already checked in handle_device_set_irqs that - * nr_fds == irq_set->count. - */ - consume_fd(data, irq_set->count, j); - } + assert(data[j] >= 0); + /* + * We've already checked in handle_device_set_irqs that + * nr_fds == irq_set->count. + */ + vfu_ctx->irqs->efds[i] = consume_fd(data, irq_set->count, j); vfu_log(vfu_ctx, VFU_DBG, "event fd[%d]=%d", i, vfu_ctx->irqs->efds[i]); } |