diff options
author | Jim Meyering <jim@meyering.net> | 2011-05-26 15:58:16 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-05-26 11:24:24 -0700 |
commit | 5dd564895e84eacfc728183fb5a9215665ff59a3 (patch) | |
tree | 8909749079c959c79a054a2d9c3e8368924158a6 /fsck.c | |
parent | 5743350f696745a48dfe7976c98dc8eb5c842d72 (diff) | |
download | git-5dd564895e84eacfc728183fb5a9215665ff59a3.tar.gz |
remove tests of always-false condition
* fsck.c (fsck_error_function): Don't test obj->sha1 == 0.
It can never be true, since that sha1 member is an array.
* transport.c (set_upstreams): Likewise for ref->new_sha1.
Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'fsck.c')
-rw-r--r-- | fsck.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -350,7 +350,7 @@ int fsck_error_function(struct object *obj, int type, const char *fmt, ...) int len; struct strbuf sb = STRBUF_INIT; - strbuf_addf(&sb, "object %s:", obj->sha1?sha1_to_hex(obj->sha1):"(null)"); + strbuf_addf(&sb, "object %s:", sha1_to_hex(obj->sha1)); va_start(ap, fmt); len = vsnprintf(sb.buf + sb.len, strbuf_avail(&sb), fmt, ap); |