CID
1021212 (#1 of 1): Copy-paste error (COPY_PASTE_ERROR)
copy_paste_error: "r" in "r = -*__errno_location()" looks like
a copy-paste error. Should it say "fd" instead?
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
fd = 0;
size = 1ULL << *order;
} else {
- fd = open(path, O_RDONLY);
-
- if (fd < 0) {
+ if ((fd = open(path, O_RDONLY)) < 0) {
r = -errno;
cerr << "rbd: error opening " << path << std::endl;
goto done2;
}
- r = fstat(fd, &stat_buf);
- if (r < 0) {
+ if ((fstat(fd, &stat_buf)) < 0) {
r = -errno;
cerr << "rbd: stat error " << path << std::endl;
goto done;