diff mbox series

[01/24] metadump: Use boolean values true/false instead of 1/0

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

Commit Message

Chandan Babu R May 23, 2023, 9 a.m. UTC
Signed-off-by: Chandan Babu R <chandan.babu@oracle.com>
---
 db/metadump.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Darrick J. Wong May 23, 2023, 4:31 p.m. UTC | #1
On Tue, May 23, 2023 at 02:30:27PM +0530, Chandan Babu R wrote:
> Signed-off-by: Chandan Babu R <chandan.babu@oracle.com>

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

--D

> ---
>  db/metadump.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/db/metadump.c b/db/metadump.c
> index 27d1df432..6bcfd5bba 100644
> --- a/db/metadump.c
> +++ b/db/metadump.c
> @@ -2421,12 +2421,12 @@ process_inode(
>  		case S_IFDIR:
>  			rval = process_inode_data(dip, TYP_DIR2);
>  			if (dip->di_format == XFS_DINODE_FMT_LOCAL)
> -				need_new_crc = 1;
> +				need_new_crc = true;
>  			break;
>  		case S_IFLNK:
>  			rval = process_inode_data(dip, TYP_SYMLINK);
>  			if (dip->di_format == XFS_DINODE_FMT_LOCAL)
> -				need_new_crc = 1;
> +				need_new_crc = true;
>  			break;
>  		case S_IFREG:
>  			rval = process_inode_data(dip, TYP_DATA);
> @@ -2436,7 +2436,7 @@ process_inode(
>  		case S_IFBLK:
>  		case S_IFSOCK:
>  			process_dev_inode(dip);
> -			need_new_crc = 1;
> +			need_new_crc = true;
>  			break;
>  		default:
>  			break;
> @@ -2450,7 +2450,7 @@ process_inode(
>  		attr_data.remote_val_count = 0;
>  		switch (dip->di_aformat) {
>  			case XFS_DINODE_FMT_LOCAL:
> -				need_new_crc = 1;
> +				need_new_crc = true;
>  				if (obfuscate || zero_stale_data)
>  					process_sf_attr(dip);
>  				break;
> @@ -2469,7 +2469,7 @@ process_inode(
>  done:
>  	/* Heavy handed but low cost; just do it as a catch-all. */
>  	if (zero_stale_data)
> -		need_new_crc = 1;
> +		need_new_crc = true;
>  
>  	if (crc_was_ok && need_new_crc)
>  		libxfs_dinode_calc_crc(mp, dip);
> -- 
> 2.39.1
>
diff mbox series

Patch

diff --git a/db/metadump.c b/db/metadump.c
index 27d1df432..6bcfd5bba 100644
--- a/db/metadump.c
+++ b/db/metadump.c
@@ -2421,12 +2421,12 @@  process_inode(
 		case S_IFDIR:
 			rval = process_inode_data(dip, TYP_DIR2);
 			if (dip->di_format == XFS_DINODE_FMT_LOCAL)
-				need_new_crc = 1;
+				need_new_crc = true;
 			break;
 		case S_IFLNK:
 			rval = process_inode_data(dip, TYP_SYMLINK);
 			if (dip->di_format == XFS_DINODE_FMT_LOCAL)
-				need_new_crc = 1;
+				need_new_crc = true;
 			break;
 		case S_IFREG:
 			rval = process_inode_data(dip, TYP_DATA);
@@ -2436,7 +2436,7 @@  process_inode(
 		case S_IFBLK:
 		case S_IFSOCK:
 			process_dev_inode(dip);
-			need_new_crc = 1;
+			need_new_crc = true;
 			break;
 		default:
 			break;
@@ -2450,7 +2450,7 @@  process_inode(
 		attr_data.remote_val_count = 0;
 		switch (dip->di_aformat) {
 			case XFS_DINODE_FMT_LOCAL:
-				need_new_crc = 1;
+				need_new_crc = true;
 				if (obfuscate || zero_stale_data)
 					process_sf_attr(dip);
 				break;
@@ -2469,7 +2469,7 @@  process_inode(
 done:
 	/* Heavy handed but low cost; just do it as a catch-all. */
 	if (zero_stale_data)
-		need_new_crc = 1;
+		need_new_crc = true;
 
 	if (crc_was_ok && need_new_crc)
 		libxfs_dinode_calc_crc(mp, dip);