summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--commands/edit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/edit.c b/commands/edit.c
index 295d0a709e..6b34101163 100644
--- a/commands/edit.c
+++ b/commands/edit.c
@@ -266,7 +266,7 @@ static int save_file(const char *path)
fd = open(path, O_WRONLY | O_TRUNC | O_CREAT);
if (fd < 0) {
printf("could not open file for writing: %s\n", errno_str());
- return -1;
+ return fd;
}
line = buffer;