zkey: fix warn_unused_result compiler warning

Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Ingo Franzki
2020-01-15 16:07:47 +01:00
committed by Jan Höppner
parent 0de533aef9
commit 1a87d3a3b4

View File

@@ -624,7 +624,7 @@ out_err:
if (rc != 0)
secure_free(pass, MAX_PASSWORD_SIZE + 1);
else
write(outfd, "\n", 1);
rc = write(outfd, "\n", 1) == 1 ? 0 : -EIO;
if (infd != STDIN_FILENO)
close(infd);