projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clean up verify_io_u()
[fio.git]
/
verify.c
diff --git
a/verify.c
b/verify.c
index 6c703eef73c3fa6911e6bc1ffc5de3923d0fe442..178b6d6a21d4b007058eaca1322112057c50464f 100644
(file)
--- a/
verify.c
+++ b/
verify.c
@@
-125,15
+125,20
@@
int verify_io_u(struct thread_data *td, struct io_u *io_u)
return EIO;
}
return EIO;
}
- if (hdr->verify_type == VERIFY_MD5)
+ switch (hdr->verify_type) {
+ case VERIFY_MD5:
ret = verify_io_u_md5(hdr, io_u);
ret = verify_io_u_md5(hdr, io_u);
- else if (hdr->verify_type == VERIFY_CRC32)
+ break;
+ case VERIFY_CRC32:
ret = verify_io_u_crc32(hdr, io_u);
ret = verify_io_u_crc32(hdr, io_u);
- else if (hdr->verify_type == VERIFY_CRC16)
+ break;
+ case VERIFY_CRC16:
ret = verify_io_u_crc16(hdr, io_u);
ret = verify_io_u_crc16(hdr, io_u);
- else if (hdr->verify_type == VERIFY_CRC7)
+ break;
+ case VERIFY_CRC7:
ret = verify_io_u_crc7(hdr, io_u);
ret = verify_io_u_crc7(hdr, io_u);
- else {
+ break;
+ default:
log_err("Bad verify type %u\n", hdr->verify_type);
ret = 1;
}
log_err("Bad verify type %u\n", hdr->verify_type);
ret = 1;
}