Skip to content

Commit c50a96c

Browse files
committed
test/librbd/fsx: use prterrcode() consistently in check_clone()
While at it, don't assign ret unnecessarily. Signed-off-by: Ilya Dryomov <[email protected]>
1 parent 7e584fa commit c50a96c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/test/librbd/fsx.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2867,14 +2867,14 @@ check_clone(int clonenum, bool replay_image)
28672867

28682868
clone_filename(filename, sizeof(filename), clonenum + 1);
28692869
if ((fd = open(filename, O_RDONLY | O_BINARY)) < 0) {
2870-
simple_err("check_clone: open", -errno);
2870+
prterrcode("check_clone: open", -errno);
28712871
exit(168);
28722872
}
28732873

28742874
prt("checking clone #%d, image %s against file %s\n",
28752875
clonenum, imagename, filename);
2876-
if ((ret = fstat(fd, &file_info)) < 0) {
2877-
simple_err("check_clone: fstat", -errno);
2876+
if (fstat(fd, &file_info) < 0) {
2877+
prterrcode("check_clone: fstat", -errno);
28782878
exit(169);
28792879
}
28802880

@@ -2896,8 +2896,8 @@ check_clone(int clonenum, bool replay_image)
28962896
exit(97);
28972897
}
28982898

2899-
if ((ret = pread(fd, good_buf, file_info.st_size, 0)) < 0) {
2900-
simple_err("check_clone: pread", -errno);
2899+
if (pread(fd, good_buf, file_info.st_size, 0) < 0) {
2900+
prterrcode("check_clone: pread", -errno);
29012901
exit(170);
29022902
}
29032903
if ((ret = ops->read(&cur_ctx, 0, file_info.st_size, temp_buf)) < 0) {

0 commit comments

Comments
 (0)