From 48a54b0f51a440cd6379ba9df82a9e726cad128c Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sun, 24 Jun 2018 00:25:14 -0400 Subject: [PATCH] e4crypt: fix invalid errno comparison with a negative error code Fixes-Coverity-Bug: 1292755 Signed-off-by: Theodore Ts'o --- misc/e4crypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/e4crypt.c b/misc/e4crypt.c index 759a082..3efbf6e 100644 --- a/misc/e4crypt.c +++ b/misc/e4crypt.c @@ -566,7 +566,7 @@ static void insert_key_into_keyring(const char *keyring, struct salt *salt) return; } else if ((rc == -1) && (errno != ENOKEY)) { printf("keyctl_search failed: %s\n", strerror(errno)); - if (errno == -EINVAL) + if (errno == EINVAL) printf("Keyring [%s] is not available.\n", keyring); exit(1); } -- 1.8.3.1