projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ad66c7f
)
chase: drop one redundant call of fstat()
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Sun, 9 Apr 2023 23:43:28 +0000
(08:43 +0900)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Sun, 9 Apr 2023 23:43:31 +0000
(08:43 +0900)
Now, 'st' is always synced with 'fd'. Hence, we can use
stat_verify_directory().
src/basic/chase.c
patch
|
blob
|
history
diff --git
a/src/basic/chase.c
b/src/basic/chase.c
index 699ca6985f6b230132fe134a42f77fd9469e04b3..dcc2339944f77988d6871144d0f31111166f961d 100644
(file)
--- a/
src/basic/chase.c
+++ b/
src/basic/chase.c
@@
-398,7
+398,7
@@
int chaseat(int dir_fd, const char *path, ChaseFlags flags, char **ret_path, int
}
if (flags & CHASE_PARENT) {
- r =
fd_verify_directory(fd
);
+ r =
stat_verify_directory(&st
);
if (r < 0)
return r;
}