[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cgit
Subject:    [PATCH 4/4] ui-refs: remove useless null check
From:       John Keeping <john () keeping ! me ! uk>
Date:       2015-10-08 22:23:59
Message-ID: 1444343039-32055-5-git-send-email-john () keeping ! me ! uk
[Download RAW message or body]

There is no way that "tag" can be null here.

Coverity-id: 13950
Signed-off-by: John Keeping <john@keeping.me.uk>
---
 ui-refs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui-refs.c b/ui-refs.c
index be3572c..295a4c7 100644
--- a/ui-refs.c
+++ b/ui-refs.c
@@ -135,7 +135,7 @@ static int print_tag(struct refinfo *ref)
 		tag = (struct tag *)obj;
 		obj = tag->tagged;
 		info = ref->tag;
-		if (!tag || !info)
+		if (!info)
 			return 1;
 	}
 
-- 
1.7.9.5

_______________________________________________
CGit mailing list
CGit@lists.zx2c4.com
http://lists.zx2c4.com/mailman/listinfo/cgit
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic