summaryrefslogtreecommitdiff
path: root/sbat.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbat.c')
-rw-r--r--sbat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbat.c b/sbat.c
index 06956122..f31d9454 100644
--- a/sbat.c
+++ b/sbat.c
@@ -537,9 +537,9 @@ set_sbat_uefi_variable(char *sbat_var_automatic, char *sbat_var_latest)
*/
if (EFI_ERROR(efi_status)) {
dprint(L"SBAT read failed %r\n", efi_status);
- } else if (preserve_sbat_uefi_variable(sbat, sbatsize, attributes,
- sbat_var_candidate) &&
- !reset_sbat) {
+ } else if (!reset_sbat &&
+ preserve_sbat_uefi_variable(sbat, sbatsize, attributes,
+ sbat_var_candidate)) {
dprint(L"preserving %s variable it is %d bytes, attributes are 0x%08x\n",
SBAT_VAR_NAME, sbatsize, attributes);
FreePool(sbat);