From: john at keeping.me.uk (John Keeping)
Subject: [PATCH 4/4] ui-refs: remove useless null check
Date: Thu, 8 Oct 2015 23:23:59 +0100 [thread overview]
Message-ID: <1444343039-32055-5-git-send-email-john@keeping.me.uk> (raw)
In-Reply-To: <1444343039-32055-1-git-send-email-john@keeping.me.uk>
There is no way that "tag" can be null here.
Coverity-id: 13950
Signed-off-by: John Keeping <john at 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
next prev parent reply other threads:[~2015-10-08 22:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-08 22:23 [PATCH 0/4] Initial Coverity fixes john
2015-10-08 22:23 ` [PATCH 1/4] cgit.c: remove useless null check john
2015-10-08 22:23 ` [PATCH 2/4] scan-tree: remove useless strdup() john
2015-10-08 22:23 ` [PATCH 3/4] ui-blob: remove useless null check john
2015-10-08 22:23 ` john [this message]
2015-10-09 8:54 ` [PATCH 0/4] Initial Coverity fixes Jason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1444343039-32055-5-git-send-email-john@keeping.me.uk \
--to=cgit@lists.zx2c4.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).