diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-10-29 02:41:35 +0100 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2018-10-29 02:41:35 +0100 |
commit | 898ce5e8b8890ca47211df641a3e91fb7a204d7c (patch) | |
tree | f6ffffb75d84d4f066643f839291f8b2f121f00a | |
parent | Merge pull request #10512 from yuwata/udev-event-cleanup (diff) | |
download | systemd-898ce5e8b8890ca47211df641a3e91fb7a204d7c.tar.xz systemd-898ce5e8b8890ca47211df641a3e91fb7a204d7c.zip |
util: do not assign return value if it is not used (#10552)
-rw-r--r-- | src/basic/stat-util.c | 4 |
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); |