From 9f6b7f7337cf6eb03c00b4f818e98d69160945e5 Mon Sep 17 00:00:00 2001 From: Gollu Appalanaidu Date: Fri, 26 Mar 2021 00:23:38 +0530 Subject: [PATCH] nvme: make else if and else statements uniform Signed-off-by: Gollu Appalanaidu --- nvme.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/nvme.c b/nvme.c index bea1a266..8fb06ce8 100644 --- a/nvme.c +++ b/nvme.c @@ -1397,8 +1397,7 @@ static int list_ctrl(int argc, char **argv, struct command *cmd, struct plugin * for (i = 0; i < (min(num, 2048)); i++) printf("[%4u]:%#x\n", i, le16_to_cpu(cntlist->identifier[i])); - } - else if (err > 0) + } else if (err > 0) nvme_show_status(err); else perror("id controller list"); @@ -2309,8 +2308,7 @@ static int id_iocs(int argc, char **argv, struct command *cmd, struct plugin *pl if (!err) { printf("NVMe Identify I/O Command Set:\n"); nvme_show_id_iocs(&iocs); - } - else if (err > 0) + } else if (err > 0) nvme_show_status(err); else perror("NVMe Identify I/O Command Set"); @@ -3413,8 +3411,7 @@ static int format(int argc, char **argv, struct command *cmd, struct plugin *plu } } else if (cfg.lbaf == 0xff) cfg.lbaf = prev_lbaf; - } - else { + } else { if (cfg.lbaf == 0xff) cfg.lbaf = 0; } @@ -3590,8 +3587,7 @@ static int set_feature(int argc, char **argv, struct command *cmd, struct plugin if (NVME_FEAT_LBA_RANGE == cfg.feature_id) { cfg.data_len = NVME_FEAT_LBA_RANGE_LEN; - } - else if (NVME_FEAT_TIMESTAMP == cfg.feature_id) { + } else if (NVME_FEAT_TIMESTAMP == cfg.feature_id) { cfg.data_len = NVME_FEAT_TIMESTAMP_STR_LEN; } @@ -3608,8 +3604,7 @@ static int set_feature(int argc, char **argv, struct command *cmd, struct plugin /* if feature ID is 0x0E, get timestamp value by -v option */ if (NVME_FEAT_TIMESTAMP == cfg.feature_id && cfg.value) { memcpy(buf, &cfg.value, NVME_FEAT_TIMESTAMP_DATA_SIZE); - } - else { + } else { if (strlen(cfg.file)) { ffd = open(cfg.file, O_RDONLY); if (ffd <= 0) { @@ -3900,8 +3895,7 @@ static int dir_send(int argc, char **argv, struct command *cmd, struct plugin *p else d_raw(buf, cfg.data_len); } - } - else if (err > 0) + } else if (err > 0) nvme_show_status(err); close_ffd: -- 2.50.1