Skip to content

Redundant else if and condition check in nvme_process_sq_io #152

@Sober7135

Description

@Sober7135
  1. The 1 && in the if condition is unnecessary
  2. The else if (status == NVME_SUCCESS) block will never be reached.

FEMU/hw/femu/nvme-io.c

Lines 76 to 85 in 1c2d358

if (1 && status == NVME_SUCCESS) {
req->status = status;
int rc = femu_ring_enqueue(n->to_ftl[index_poller], (void *)&req, 1);
if (rc != 1) {
femu_err("enqueue failed, ret=%d\n", rc);
}
} else if (status == NVME_SUCCESS) {
/* Normal I/Os that don't need delay emulation */
req->status = status;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions