On Fri, May 29, 2015 at 02:13:24PM -0500, Eric Sandeen wrote: > Seeing "if (!dont_obfuscate)" hurts my brain; rename it to > "obfuscate" and invert the logic. > > Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx> > --- We could have gone with dont_not_obfuscate, but this works too. ;) Reviewed-by: Brian Foster <bfoster@xxxxxxxxxx> > db/metadump.c | 14 +++++++------- > 1 files changed, 7 insertions(+), 7 deletions(-) > > diff --git a/db/metadump.c b/db/metadump.c > index b227a6d..57b53d9 100644 > --- a/db/metadump.c > +++ b/db/metadump.c > @@ -74,7 +74,7 @@ static xfs_ino_t cur_ino; > static int show_progress = 0; > static int stop_on_read_error = 0; > static int max_extent_size = DEFAULT_MAX_EXT_SIZE; > -static int dont_obfuscate = 0; > +static int obfuscate = 1; > static int show_warnings = 0; > static int progress_since_warning = 0; > > @@ -1368,7 +1368,7 @@ process_single_fsb_objects( > > } > > - if (dont_obfuscate) > + if (!obfuscate) > goto write; > > dp = iocur_top->data; > @@ -1460,7 +1460,7 @@ process_multi_fsb_objects( > > } > > - if (dont_obfuscate || o >= mp->m_dir_geo->leafblk) { > + if (!obfuscate || o >= mp->m_dir_geo->leafblk) { > ret = write_buf(iocur_top); > goto out_pop; > } > @@ -1725,7 +1725,7 @@ process_inode_data( > { > switch (dip->di_format) { > case XFS_DINODE_FMT_LOCAL: > - if (!dont_obfuscate) > + if (obfuscate) > switch (itype) { > case TYP_DIR2: > obfuscate_sf_dir(dip); > @@ -1769,7 +1769,7 @@ process_inode( > cur_ino = XFS_AGINO_TO_INO(mp, agno, agino); > > /* we only care about crc recalculation if we are obfuscating names. */ > - if (!dont_obfuscate) { > + if (obfuscate) { > crc_was_ok = xfs_verify_cksum((char *)dip, > mp->m_sb.sb_inodesize, > offsetof(struct xfs_dinode, di_crc)); > @@ -1801,7 +1801,7 @@ process_inode( > switch (dip->di_aformat) { > case XFS_DINODE_FMT_LOCAL: > need_new_crc = 1; > - if (!dont_obfuscate) > + if (obfuscate) > obfuscate_sf_attr(dip); > break; > > @@ -2247,7 +2247,7 @@ metadump_f( > } > break; > case 'o': > - dont_obfuscate = 1; > + obfuscate = 0; > break; > case 'w': > show_warnings = 1; > -- 1.7.1 > > _______________________________________________ > xfs mailing list > xfs@xxxxxxxxxxx > http://oss.sgi.com/mailman/listinfo/xfs _______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs