diff mbox series

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

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

Commit Message

Stefano Babic Oct. 30, 2024, 10:15 a.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 73ce73a3..bf5c500a 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 93aa29e4..0123e019 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) {