summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStef Walter <stefw@redhat.com>2015-11-09 08:36:36 +0100
committerStef Walter <stefw@redhat.com>2015-11-09 08:36:36 +0100
commita512a01e4c2700a6454d024150aa222f64885d59 (patch)
tree1dcd2f306823fc3a3b8cc22b130e2936036ac213
parent6558c7174bc6778f13347fc1a356ed6773cef830 (diff)
downloadp11-kit-a512a01e4c2700a6454d024150aa222f64885d59.tar.gz
trust: Fix always false comparison of EAGAIN and EINTR
https://bugs.freedesktop.org/show_bug.cgi?id=92864
-rw-r--r--trust/save.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/trust/save.c b/trust/save.c
index b7ab21e..66c9050 100644
--- a/trust/save.c
+++ b/trust/save.c
@@ -145,7 +145,7 @@ p11_save_write (p11_save_file *file,
while (written < length) {
res = write (file->fd, buf + written, length - written);
if (res <= 0) {
- if (errno == EAGAIN && errno == EINTR)
+ if (errno == EAGAIN || errno == EINTR)
continue;
p11_message_err (errno, "couldn't write to file: %s", file->temp);
return false;