From: Theodore Ts'o Date: Sun, 24 Jun 2018 04:25:14 +0000 (-0400) Subject: e4crypt: fix invalid errno comparison with a negative error code X-Git-Tag: v1.44.3-rc1~18 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=48a54b0f51a440cd6379ba9df82a9e726cad128c;p=tools%2Fe2fsprogs.git e4crypt: fix invalid errno comparison with a negative error code Fixes-Coverity-Bug: 1292755 Signed-off-by: Theodore Ts'o --- 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); }