From: Stef Walter Date: Mon, 9 Nov 2015 07:36:36 +0000 (+0100) Subject: trust: Fix always false comparison of EAGAIN and EINTR X-Git-Tag: 0.23.2~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a512a01e4c2700a6454d024150aa222f64885d59;p=p11-kit trust: Fix always false comparison of EAGAIN and EINTR https://bugs.freedesktop.org/show_bug.cgi?id=92864 --- 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;