chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0f556fa
)
Use STRLEN in two places
author
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Fri, 11 May 2018 09:09:37 +0000
(11:09 +0200)
committer
Sven Eden
<yamakuzure@gmx.net>
Fri, 24 Aug 2018 14:47:08 +0000
(16:47 +0200)
src/basic/fs-util.c
patch
|
blob
|
history
diff --git
a/src/basic/fs-util.c
b/src/basic/fs-util.c
index 24c4470363235728b8620e796e51189947a25ca8..5fb8b88fdbf5d3f5f20d9856283556e79e02c282 100644
(file)
--- a/
src/basic/fs-util.c
+++ b/
src/basic/fs-util.c
@@
-251,7
+251,7
@@
int fchmod_umask(int fd, mode_t m) {
}
int fchmod_opath(int fd, mode_t m) {
}
int fchmod_opath(int fd, mode_t m) {
- char procfs_path[
strlen
("/proc/self/fd/") + DECIMAL_STR_MAX(int)];
+ char procfs_path[
STRLEN
("/proc/self/fd/") + DECIMAL_STR_MAX(int)];
/* This function operates also on fd that might have been opened with
* O_PATH. Indeed fchmodat() doesn't have the AT_EMPTY_PATH flag like
/* This function operates also on fd that might have been opened with
* O_PATH. Indeed fchmodat() doesn't have the AT_EMPTY_PATH flag like
@@
-1081,15
+1081,6
@@
int access_fd(int fd, int mode) {
return r;
}
return r;
}
-void unlink_tempfilep(char (*p)[]) {
- /* If the file is created with mkstemp(), it will (almost always)
- * change the suffix. Treat this as a sign that the file was
- * successfully created. We ignore both the rare case where the
- * original suffix is used and unlink failures. */
- if (!endswith(*p, ".XXXXXX"))
- (void) unlink(*p);
-}
-
int unlinkat_deallocate(int fd, const char *name, int flags) {
_cleanup_close_ int truncate_fd = -1;
struct stat st;
int unlinkat_deallocate(int fd, const char *name, int flags) {
_cleanup_close_ int truncate_fd = -1;
struct stat st;