Skip to content

Commit 8837eb4

Browse files
peffgitster
authored andcommitted
http: style fixes for curl_multi_init error check
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent faa3807 commit 8837eb4

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

http.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -421,10 +421,8 @@ void http_init(struct remote *remote, const char *url, int proactive_auth)
421421
}
422422

423423
curlm = curl_multi_init();
424-
if (curlm == NULL) {
425-
fprintf(stderr, "Error creating curl multi handle.\n");
426-
exit(1);
427-
}
424+
if (!curlm)
425+
die("curl_multi_init failed");
428426
#endif
429427

430428
if (getenv("GIT_SSL_NO_VERIFY"))

0 commit comments

Comments
 (0)