summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/basic/stat-util.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/basic/stat-util.c b/src/basic/stat-util.c
index 762777e94f..4e8651f428 100644
--- a/src/basic/stat-util.c
+++ b/src/basic/stat-util.c
@@ -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);