summaryrefslogtreecommitdiff
path: root/src/basic/fileio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic/fileio.c')
-rw-r--r--src/basic/fileio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/basic/fileio.c b/src/basic/fileio.c
index 7b1014b1d..41c38197e 100644
--- a/src/basic/fileio.c
+++ b/src/basic/fileio.c
@@ -780,7 +780,6 @@ int load_env_file(FILE *f, const char *fname, const char *newline, char ***rl) {
*rl = m;
return 0;
}
-#endif // 0
static int load_env_file_push_pairs(
const char *filename, unsigned line,
@@ -830,7 +829,6 @@ int load_env_file_pairs(FILE *f, const char *fname, const char *newline, char **
*rl = m;
return 0;
}
-#if 0 /// UNNEEDED by elogind
static int merge_env_file_push(
const char *filename, unsigned line,
@@ -1499,6 +1497,7 @@ int open_serialization_fd(const char *ident) {
#if 0 /// UNNEEDED by elogind
int link_tmpfile(int fd, const char *path, const char *target) {
+ int r;
assert(fd >= 0);
assert(target);
@@ -1511,8 +1510,9 @@ int link_tmpfile(int fd, const char *path, const char *target) {
* operation currently (renameat2() does), and there is no nice way to emulate this. */
if (path) {
- if (rename_noreplace(AT_FDCWD, path, AT_FDCWD, target) < 0)
- return -errno;
+ r = rename_noreplace(AT_FDCWD, path, AT_FDCWD, target);
+ if (r < 0)
+ return r;
} else {
char proc_fd_path[STRLEN("/proc/self/fd/") + DECIMAL_STR_MAX(fd) + 1];