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 | 11 +++++------
 1 file changed, 5 insertions(+), 6 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 <inttypes.h>
 #include <utime.h>
 #include <errno.h>
-#include <stdbool.h>
 #include <fcntl.h>
 #ifdef WITH_CAP
 #include <sys/capability.h>
@@ -56,7 +55,7 @@ struct filedata_s {
     int stage;
     int setmeta;
     int skip;
-    bool plugin_contents;
+    int plugin_contents;
     rpmFileAction action;
     const char *suffix;
     char *fpath;
@@ -890,10 +889,10 @@ int rpmPackageFilesInstall(rpmts ts, rpmte te, rpmfiles files,
     struct diriter_s di = { -1, -1 };
     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 */
@@ -924,7 +923,7 @@ int rpmPackageFilesInstall(rpmts ts, rpmte te, rpmfiles files,
 	    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;
@@ -986,7 +985,7 @@ int rpmPackageFilesInstall(rpmts ts, rpmte te, rpmfiles files,
 		rc = rpmpluginsCallFsmFilePre(plugins, fi, fp->fpath,
 					      fp->sb.st_mode, fp->action);
 		if (rc == RPMRC_PLUGIN_CONTENTS) {
-		    fp->plugin_contents = true;
+		    fp->plugin_contents = 1;
 		    rc = RPMRC_OK;
 		}
 	    }
-- 
2.35.1