It's more common to use the following coding style:
if (condition) {
do_that;
do_this;
} else if (condition2) {
do_this;
} else {
do_that;
}
Reviewed-by: Minwoo Im <minwoo.im@samsung.com>
Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
for (i = 0; i < 1024; i++)
if (ns_list[i])
printf("[%4u]:%#x\n", i, le32_to_cpu(ns_list[i]));
- }
- else if (err > 0)
+ } else if (err > 0) {
show_nvme_status(err);
- else
+ } else {
perror("id namespace list");
+ }
close_fd:
close(fd);