tmpfile-util: turn last parameter of link_tmpfile() into a proper flags
This changes a boolean param into a proper bitflag field. Given this only defines a single flag for now this doesn't look like much of an improvement. But we'll add another flag shortly, where it starts to make more sense.
This commit is contained in:
+1
-1
@@ -1465,7 +1465,7 @@ int copy_file_atomic_at_full(
|
||||
return -errno;
|
||||
}
|
||||
|
||||
r = link_tmpfile_at(fdt, dir_fdt, t, to, copy_flags & COPY_REPLACE);
|
||||
r = link_tmpfile_at(fdt, dir_fdt, t, to, (copy_flags & COPY_REPLACE) ? LINK_TMPFILE_REPLACE : 0);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
|
||||
@@ -408,7 +408,7 @@ static int trie_store(struct trie *trie, const char *filename, bool compat) {
|
||||
return -errno;
|
||||
fwrite(&h, sizeof(struct trie_header_f), 1, f);
|
||||
|
||||
r = flink_tmpfile(f, filename_tmp, filename, /* replace= */ true);
|
||||
r = flink_tmpfile(f, filename_tmp, filename, LINK_TMPFILE_REPLACE);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user