82802ab.c: Retype appropriate variables with bool

Use the bool type instead of an integer for appropriate variables, since
this represents their purpose much better.

Signed-off-by: Felix Singer <felixsinger@posteo.net>
Change-Id: I5dfd9ed4856c37dd70706b2dd71fbb9a8acbdf4c
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/66879
Original-Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Original-Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/71481
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/82802ab.c b/82802ab.c
index b485c11..a348347 100644
--- a/82802ab.c
+++ b/82802ab.c
@@ -22,6 +22,7 @@
  *  - Order number: 290658-004
  */
 
+#include <stdbool.h>
 #include "flash.h"
 #include "chipdrivers.h"
 
@@ -143,7 +144,8 @@
 int unlock_28f004s5(struct flashctx *flash)
 {
 	chipaddr bios = flash->virtual_memory;
-	uint8_t mcfg, bcfg, need_unlock = 0, can_unlock = 0;
+	uint8_t mcfg, bcfg;
+	bool need_unlock = false, can_unlock = false;
 	unsigned int i;
 
 	/* Clear status register */
@@ -159,7 +161,7 @@
 		msg_cdbg("locked!\n");
 	} else {
 		msg_cdbg("unlocked!\n");
-		can_unlock = 1;
+		can_unlock = true;
 	}
 
 	/* Read block lock-bits */
@@ -167,7 +169,7 @@
 		bcfg = chip_readb(flash, bios + i + 2); // read block lock config
 		msg_cdbg("block lock at %06x is %slocked!\n", i, bcfg ? "" : "un");
 		if (bcfg) {
-			need_unlock = 1;
+			need_unlock = true;
 		}
 	}
 
@@ -196,7 +198,7 @@
 {
 	chipaddr bios = flash->virtual_memory;
 	uint8_t mcfg, bcfg;
-	uint8_t need_unlock = 0, can_unlock = 0;
+	bool need_unlock = false, can_unlock = false;
 	unsigned int i;
 
 	/* Wait if chip is busy */
@@ -212,7 +214,7 @@
 		msg_cdbg("locked!\n");
 	} else {
 		msg_cdbg("unlocked!\n");
-		can_unlock = 1;
+		can_unlock = true;
 	}
 
 	/* Read block lock-bits, 8 * 8 KB + 15 * 64 KB */
@@ -222,7 +224,7 @@
 		msg_cdbg("block lock at %06x is %slocked!\n", i,
 			 bcfg ? "" : "un");
 		if (bcfg)
-			need_unlock = 1;
+			need_unlock = true;
 	}
 
 	/* Reset chip */