From 0569bb12a6334becc7cd38ea350a5fe6a03ebcb7 Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Fri, 7 Feb 2014 09:48:44 +0100 Subject: commands: edit: properly propagate error code Signed-off-by: Lucas Stach Signed-off-by: Sascha Hauer --- commands/edit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'commands') 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; -- cgit v1.2.3