Skip to content

Commit

Permalink
Cleanup style nit of 'x == NULL' in remote.c
Browse files Browse the repository at this point in the history
Git style tends to prefer "!x" over "x == NULL".  Make it so in
these handful of locations that were not following along.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Shawn O. Pearce authored and Junio C Hamano committed Sep 25, 2007
1 parent f4e9576 commit 009c5bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ int remote_find_tracking(struct remote *remote, struct refspec *refspec)
int i;

if (find_src) {
if (refspec->dst == NULL)
if (!refspec->dst)
return error("find_tracking: need either src or dst");
needle = refspec->dst;
result = &refspec->src;
Expand Down Expand Up @@ -613,7 +613,7 @@ static int match_explicit(struct ref *src, struct ref *dst,
if (!matched_src)
errs = 1;

if (dst_value == NULL)
if (!dst_value)
dst_value = matched_src->name;

switch (count_refspec_match(dst_value, dst, &matched_dst)) {
Expand All @@ -633,7 +633,7 @@ static int match_explicit(struct ref *src, struct ref *dst,
dst_value);
break;
}
if (errs || matched_dst == NULL)
if (errs || !matched_dst)
return 1;
if (matched_dst->peer_ref) {
errs = 1;
Expand Down

0 comments on commit 009c5bc

Please sign in to comment.