X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=tools%2Fnamespacize.c;h=5ac85f502f2abb0f5cc9cea1d583c68fdf5546d0;hp=77269aac317dac5a4d7c7b319aa794472739f116;hb=b30c544bd1486e7b60b99259e3d0dcbc1ec9efd0;hpb=747a69435d9f83c0968d9689c4951bc0233ffc5e diff --git a/tools/namespacize.c b/tools/namespacize.c index 77269aac..5ac85f50 100644 --- a/tools/namespacize.c +++ b/tools/namespacize.c @@ -406,7 +406,7 @@ static void setup_adjust_files(const char *dir, static void rename_files(const struct adjusted *adj) { while (adj) { - if (rename(adj->tmpfile, adj->file) != 0) + if (!move_file(adj->tmpfile, adj->file)) warn("Could not rename over '%s', we're in trouble", adj->file); adj = adj->next; @@ -445,7 +445,7 @@ static struct replace *read_replacement_file(const char *depdir) return NULL; } - for (line = strsplit(file, file, "\n", NULL); *line; line++) + for (line = strsplit(file, file, "\n"); *line; line++) add_replace(&repl, *line); return repl; }