util: do not assign return value if it is not used (#10552)
This commit is contained in:
@@ -47,10 +47,8 @@ int is_dir(const char* path, bool follow) {
|
||||
|
||||
int is_dir_fd(int fd) {
|
||||
struct stat st;
|
||||
int r;
|
||||
|
||||
r = fstat(fd, &st);
|
||||
if (r < 0)
|
||||
if (fstat(fd, &st) < 0)
|
||||
return -errno;
|
||||
|
||||
return !!S_ISDIR(st.st_mode);
|
||||
|
||||
Reference in New Issue
Block a user