]> granicus.if.org Git - p11-kit/commitdiff
trust: Fix always false comparison of EAGAIN and EINTR
authorStef Walter <stefw@redhat.com>
Mon, 9 Nov 2015 07:36:36 +0000 (08:36 +0100)
committerStef Walter <stefw@redhat.com>
Mon, 9 Nov 2015 07:36:36 +0000 (08:36 +0100)
https://bugs.freedesktop.org/show_bug.cgi?id=92864

trust/save.c

index b7ab21e642f1658aba2a19bc123eb142527d157f..66c9050fdef677060d76d9c6255845c0eda1dc15 100644 (file)
@@ -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;