Blob Blame History Raw
From 845b5c3882b1eecb31d712b61a4e91fe0eb70712 Mon Sep 17 00:00:00 2001
From: Matthew Almond <malmond@fb.com>
Date: Sun, 31 Jan 2021 12:30:33 -0800
Subject: [PATCH 02/30] Remove use of bool type for consistency

---
 lib/fsm.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/lib/fsm.c b/lib/fsm.c
index 90193c749..feda3750c 100644
--- a/lib/fsm.c
+++ b/lib/fsm.c
@@ -8,7 +8,6 @@

 #include <utime.h>
 #include <errno.h>
-#include <stdbool.h>
 #if WITH_CAP
 #include <sys/capability.h>
 #endif
@@ -896,10 +895,10 @@ int rpmPackageFilesInstall(rpmts ts, rpmte te, rpmfiles files,
 
     Header h = rpmteHeader(te);
     const char *payloadfmt = headerGetString(h, RPMTAG_PAYLOADFORMAT);
-    bool cpio = true;
+    int cpio = 1;
 
     if (payloadfmt && rstreq(payloadfmt, "clon")) {
-	cpio = false;
+	cpio = 0;
     }
 
     /* transaction id used for temporary path suffix while installing */
@@ -927,13 +926,13 @@ int rpmPackageFilesInstall(rpmts ts, rpmte te, rpmfiles files,
 	/* Run fsm file pre hook for all plugins */
 	rc = rpmpluginsCallFsmFilePre(plugins, fi, fp->fpath,
 				      fp->sb.st_mode, fp->action);
-	fp->plugin_contents = false;
+	fp->plugin_contents = 0;
 	switch (rc) {
 	case RPMRC_OK:
 	    setFileState(fs, fx);
 	    break;
 	case RPMRC_PLUGIN_CONTENTS:
-	    fp->plugin_contents = true;
+	    fp->plugin_contents = 1;
 	    // reduce reads on cpio to this value. Could be zero if
 	    // this is from a hard link.
 	    rc = RPMRC_OK;
-- 
2.35.1