diff mbox series

[V2,14/23] mdrestore: Declare boolean variables with bool type

Message ID 20230606092806.1604491-15-chandan.babu@oracle.com (mailing list archive)
State Superseded
Headers show
Series Metadump v2 | expand

Commit Message

Chandan Babu R June 6, 2023, 9:27 a.m. UTC
Signed-off-by: Chandan Babu R <chandan.babu@oracle.com>
---
 mdrestore/xfs_mdrestore.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Darrick J. Wong July 12, 2023, 5:35 p.m. UTC | #1
On Tue, Jun 06, 2023 at 02:57:57PM +0530, Chandan Babu R wrote:
> Signed-off-by: Chandan Babu R <chandan.babu@oracle.com>

Looks good,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  mdrestore/xfs_mdrestore.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/mdrestore/xfs_mdrestore.c b/mdrestore/xfs_mdrestore.c
> index 481dd00c..ca28c48e 100644
> --- a/mdrestore/xfs_mdrestore.c
> +++ b/mdrestore/xfs_mdrestore.c
> @@ -7,9 +7,9 @@
>  #include "libxfs.h"
>  #include "xfs_metadump.h"
>  
> -static int	show_progress = 0;
> -static int	show_info = 0;
> -static int	progress_since_warning = 0;
> +static bool	show_progress = false;
> +static bool	show_info = false;
> +static bool	progress_since_warning = false;
>  
>  static void
>  fatal(const char *msg, ...)
> @@ -35,7 +35,7 @@ print_progress(const char *fmt, ...)
>  
>  	printf("\r%-59s", buf);
>  	fflush(stdout);
> -	progress_since_warning = 1;
> +	progress_since_warning = true;
>  }
>  
>  /*
> @@ -202,10 +202,10 @@ main(
>  	while ((c = getopt(argc, argv, "giV")) != EOF) {
>  		switch (c) {
>  			case 'g':
> -				show_progress = 1;
> +				show_progress = true;
>  				break;
>  			case 'i':
> -				show_info = 1;
> +				show_info = true;
>  				break;
>  			case 'V':
>  				printf("%s version %s\n", progname, VERSION);
> -- 
> 2.39.1
>
diff mbox series

Patch

diff --git a/mdrestore/xfs_mdrestore.c b/mdrestore/xfs_mdrestore.c
index 481dd00c..ca28c48e 100644
--- a/mdrestore/xfs_mdrestore.c
+++ b/mdrestore/xfs_mdrestore.c
@@ -7,9 +7,9 @@ 
 #include "libxfs.h"
 #include "xfs_metadump.h"
 
-static int	show_progress = 0;
-static int	show_info = 0;
-static int	progress_since_warning = 0;
+static bool	show_progress = false;
+static bool	show_info = false;
+static bool	progress_since_warning = false;
 
 static void
 fatal(const char *msg, ...)
@@ -35,7 +35,7 @@  print_progress(const char *fmt, ...)
 
 	printf("\r%-59s", buf);
 	fflush(stdout);
-	progress_since_warning = 1;
+	progress_since_warning = true;
 }
 
 /*
@@ -202,10 +202,10 @@  main(
 	while ((c = getopt(argc, argv, "giV")) != EOF) {
 		switch (c) {
 			case 'g':
-				show_progress = 1;
+				show_progress = true;
 				break;
 			case 'i':
-				show_info = 1;
+				show_info = true;
 				break;
 			case 'V':
 				printf("%s version %s\n", progname, VERSION);