FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 08-11-2011, 09:03 PM
Bob Peterson
 
Default fsck.gfs2: get rid of triple negative logic

>From 62d7423184da8e291396cb54269612d501437006 Mon Sep 17 00:00:00 2001
From: Bob Peterson <rpeterso@redhat.com>
Date: Mon, 8 Aug 2011 14:44:46 -0500
Subject: [PATCH 12/44] fsck.gfs2: get rid of triple negative logic

This patch changes the logic of the code from being triple-negative
to single-negative so it won't twist your brain into knots.

rhbz#675723
---
gfs2/fsck/metawalk.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gfs2/fsck/metawalk.c b/gfs2/fsck/metawalk.c
index f2cd938..a4d7d3e 100644
--- a/gfs2/fsck/metawalk.c
+++ b/gfs2/fsck/metawalk.c
@@ -930,7 +930,7 @@ static int delete_block_if_notdup(struct gfs2_inode *ip, uint64_t block,
uint8_t q;
struct duptree *d;

- if (!valid_block(ip->i_sbd, block) != 0)
+ if (!valid_block(ip->i_sbd, block))
return -EFAULT;

q = block_type(block);
--
1.7.4.4
 
Old 01-20-2012, 02:09 PM
 
Default fsck.gfs2: get rid of triple negative logic

From: Bob Peterson <rpeterso@redhat.com>

This patch changes the logic of the code from being triple-negative
to single-negative so it won't twist your brain into knots.

rhbz#675723
---
gfs2/fsck/metawalk.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gfs2/fsck/metawalk.c b/gfs2/fsck/metawalk.c
index 2db389f..888acec 100644
--- a/gfs2/fsck/metawalk.c
+++ b/gfs2/fsck/metawalk.c
@@ -930,7 +930,7 @@ static int delete_block_if_notdup(struct gfs2_inode *ip, uint64_t block,
uint8_t q;
struct duptree *d;

- if (!valid_block(ip->i_sbd, block) != 0)
+ if (!valid_block(ip->i_sbd, block))
return -EFAULT;

q = block_type(block);
--
1.7.7.5
 

Thread Tools




All times are GMT. The time now is 08:25 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org