Skip to content

Commit

Permalink
http: style fixes for curl_multi_init error check
Browse files Browse the repository at this point in the history
Unless there is a good reason, we should use die() rather than
fprintf/exit. We can also shorten the message to match other curl init
failures (and match our usual lowercase no-full-stop style).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jeff King authored and Junio C Hamano committed Aug 21, 2014
1 parent faa3807 commit 8837eb4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions http.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,10 +421,8 @@ void http_init(struct remote *remote, const char *url, int proactive_auth)
}

curlm = curl_multi_init();
if (curlm == NULL) {
fprintf(stderr, "Error creating curl multi handle.\n");
exit(1);
}
if (!curlm)
die("curl_multi_init failed");
#endif

if (getenv("GIT_SSL_NO_VERIFY"))
Expand Down

0 comments on commit 8837eb4

Please sign in to comment.