9
0
Fork 0

commands: edit: properly propagate error code

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Lucas Stach 2014-02-07 09:48:44 +01:00 committed by Sascha Hauer
parent aa6694b542
commit 0569bb12a6
1 changed files with 1 additions and 1 deletions

View File

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