diff mbox series

[V2,03/10] Cleanup: use bool instead of int for mount option

Message ID 20241030163957.2822282-4-stefano.babic@swupdate.org
State Accepted
Headers show
Series Introduce BTRFS Snapshot Handler | expand

Commit Message

Stefano Babic Oct. 30, 2024, 4:39 p.m. UTC
Replace in archive and raw handler.

Signed-off-by: Stefano Babic <stefano.babic@swupdate.org>
---
 handlers/archive_handler.c | 2 +-
 handlers/raw_handler.c     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--
2.34.1
diff mbox series

Patch

diff --git a/handlers/archive_handler.c b/handlers/archive_handler.c
index 6dee6ae5..4ef461ca 100644
--- a/handlers/archive_handler.c
+++ b/handlers/archive_handler.c
@@ -233,7 +233,7 @@  static int install_archive_image(struct img_type *img,
 	char pwd[256] = "\0";
 	struct extract_data tf;
 	pthread_attr_t attr;
-	int use_mount = (strlen(img->device) && strlen(img->filesystem)) ? 1 : 0;
+	bool use_mount = (strlen(img->device) && strlen(img->filesystem)) ? true : false;
 	int is_mounted = 0;
 	int exitval = -EFAULT;
 	char *DATADST_DIR = NULL;
diff --git a/handlers/raw_handler.c b/handlers/raw_handler.c
index a68b3ed3..177ada2c 100644
--- a/handlers/raw_handler.c
+++ b/handlers/raw_handler.c
@@ -154,7 +154,7 @@  static int install_raw_file(struct img_type *img,
 	int fdout = -1;
 	int ret = -1;
 	int cleanup_ret = 0;
-	int use_mount = (strlen(img->device) && strlen(img->filesystem)) ? 1 : 0;
+	bool use_mount = (strlen(img->device) && strlen(img->filesystem)) ? true : false;
 	char* DATADST_DIR = NULL;

 	if (strlen(img->path) == 0) {