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;
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;
}