From: Yu Watanabe Date: Mon, 29 Oct 2018 01:41:35 +0000 (+0900) Subject: util: do not assign return value if it is not used (#10552) X-Git-Tag: v240~452 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=898ce5e8b8890ca47211df641a3e91fb7a204d7c;p=thirdparty%2Fsystemd.git util: do not assign return value if it is not used (#10552) --- diff --git a/src/basic/stat-util.c b/src/basic/stat-util.c index 762777e94fb..4e8651f4289 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);