{"thread":{"id":"10003","subject":"[PATCH 1/3] Cleanup style nit of 'x == NULL' in remote.c","startedAt":"2007-09-25T04:13:14Z","lastAt":"2007-09-25T04:13:14Z","messageCount":1,"participants":["Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"53958","messageId":"20070925041314.GA11363@spearce.org","threadId":"10003","inReplyTo":null,"subject":"[PATCH 1/3] Cleanup style nit of 'x == NULL' in remote.c","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-09-25T04:13:14Z","receivedAt":"2007-09-25T04:13:14Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Git style tends to prefer \"!x\" over \"x == NULL\".  Make it so in\nthese handful of locations that were not following along.\n\nSigned-off-by: Shawn O. Pearce <spearce@spearce.org>\n---\n remote.c |    6 +++---\n 1 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/remote.c b/remote.c\nindex e3c3df5..ac354f3 100644\n--- a/remote.c\n+++ b/remote.c\n@@ -416,7 +416,7 @@ int remote_find_tracking(struct remote *remote, struct refspec *refspec)\n \tint i;\n \n \tif (find_src) {\n-\t\tif (refspec->dst == NULL)\n+\t\tif (!refspec->dst)\n \t\t\treturn error(\"find_tracking: need either src or dst\");\n \t\tneedle = refspec->dst;\n \t\tresult = &refspec->src;\n@@ -613,7 +613,7 @@ static int match_explicit(struct ref *src, struct ref *dst,\n \tif (!matched_src)\n \t\terrs = 1;\n \n-\tif (dst_value == NULL)\n+\tif (!dst_value)\n \t\tdst_value = matched_src->name;\n \n \tswitch (count_refspec_match(dst_value, dst, &matched_dst)) {\n@@ -633,7 +633,7 @@ static int match_explicit(struct ref *src, struct ref *dst,\n \t\t      dst_value);\n \t\tbreak;\n \t}\n-\tif (errs || matched_dst == NULL)\n+\tif (errs || !matched_dst)\n \t\treturn 1;\n \tif (matched_dst->peer_ref) {\n \t\terrs = 1;\n-- \n1.5.3.2.124.g2456-dirty\n"}]}