util: do not assign return value if it is not used (#10552)

This commit is contained in:
Yu Watanabe
2018-10-28 18:41:35 -07:00
committed by Vito Caputo
parent 815628cdd4
commit 898ce5e8b8
+1 -3
View File
@@ -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);