@matheusbsbs / matheus-bagliano / commits / 009c5bcd24
Fork 0

Cleanup style nit of 'x == NULL' in remote.c

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>

Shawn O. Pearce committed Sep 25, 2007 at 00:13 UTC 009c5bcd24da3cd2670962e405585e31d662487d
1 file changed +3 -3
remote.c
+3 -3
@@ -416,7 +416,7 @@ int remote_find_tracking(struct remote *remote, struct refspec *refspec)
416 int i;
417
418 if (find_src) {
419 - if (refspec->dst == NULL)
419 + if (!refspec->dst)
420 return error("find_tracking: need either src or dst");
421 needle = refspec->dst;
422 result = &refspec->src;
@@ -613,7 +613,7 @@ static int match_explicit(struct ref *src, struct ref *dst,
613 if (!matched_src)
614 errs = 1;
615
616 - if (dst_value == NULL)
616 + if (!dst_value)
617 dst_value = matched_src->name;
618
619 switch (count_refspec_match(dst_value, dst, &matched_dst)) {
@@ -633,7 +633,7 @@ static int match_explicit(struct ref *src, struct ref *dst,
633 dst_value);
634 break;
635 }
636 - if (errs || matched_dst == NULL)
636 + if (errs || !matched_dst)
637 return 1;
638 if (matched_dst->peer_ref) {
639 errs = 1;