arrfab / rpms / shim-signed

Forked from rpms/shim-signed 4 years ago
Clone
Blob Blame History Raw
From 2fa167f3905ebee27221fc2b1db4b79e215d8ca0 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Mon, 3 Apr 2017 16:33:38 -0400
Subject: [PATCH 09/10] list_keys_in_var(): check errno correctly, not ret
 twice.

Signed-off-by: Peter Jones <pjones@redhat.com>
---
 src/mokutil.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mokutil.c b/src/mokutil.c
index 27f1292f3a9..0be9e8491fd 100644
--- a/src/mokutil.c
+++ b/src/mokutil.c
@@ -602,7 +602,7 @@ list_keys_in_var (const char *var_name, const efi_guid_t guid)
 
 	ret = efi_get_variable (guid, var_name, &data, &data_size, &attributes);
 	if (ret < 0) {
-		if (ret == ENOENT) {
+		if (errno == ENOENT) {
 			printf ("%s is empty\n", var_name);
 			return 0;
 		}
-- 
2.17.1