projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
815628c
)
util: do not assign return value if it is not used (#10552)
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Mon, 29 Oct 2018 01:41:35 +0000
(10:41 +0900)
committer
Vito Caputo
<vcaputo@pengaru.com>
Mon, 29 Oct 2018 01:41:35 +0000
(18:41 -0700)
src/basic/stat-util.c
patch
|
blob
|
history
diff --git
a/src/basic/stat-util.c
b/src/basic/stat-util.c
index
762777e
..
4e8651f
100644
(file)
--- 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);