Commit 02a42c83 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Tweak error reporting (unlink babel-state).

parent 96e7ba69
......@@ -440,9 +440,8 @@ main(int argc, char **argv)
if(fd < 0 && errno != ENOENT)
perror("open(babel-state)");
rc = unlink(state_file);
if(rc < 0)
perror("unlink(babel-state)");
if(fd >= 0 && rc < 0) {
perror("unlink(babel-state)");
/* If we couldn't unlink it, it's probably stale. */
close(fd);
fd = -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment