From fcae82620bdfdd1c97872b9830538d1d4ae01b0d Mon Sep 17 00:00:00 2001 From: jaanus Date: Mon, 29 Dec 2014 20:36:48 +0200 Subject: [PATCH] More compact code, no need for local vars. --- ObjectiveGit/GTRepository.m | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ObjectiveGit/GTRepository.m b/ObjectiveGit/GTRepository.m index aad14d215..7592c6569 100644 --- a/ObjectiveGit/GTRepository.m +++ b/ObjectiveGit/GTRepository.m @@ -269,9 +269,7 @@ + (id)cloneFromURL:(NSURL *)originURL toWorkingDirectory:(NSURL *)workdirURL opt NSURL *serverCertificateURL = options[GTRepositoryCloneOptionsServerCertificateURL]; if (serverCertificateURL) { - const char *file = serverCertificateURL.fileSystemRepresentation; - const char *path = NULL; - int gitError = git_libgit2_opts(GIT_OPT_SET_SSL_CERT_LOCATIONS, file, path); + int gitError = git_libgit2_opts(GIT_OPT_SET_SSL_CERT_LOCATIONS, serverCertificateURL.fileSystemRepresentation, NULL); if (gitError < GIT_OK) { if (error != NULL) *error = [NSError git_errorFor:gitError description:@"Failed to configure the server certificate at %@", serverCertificateURL]; return nil;