From 3e20154a9d1ac15913cb639b057561e9043e6215 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Sat, 25 Apr 2015 00:38:22 +0200 Subject: [PATCH] remote: simplify anonymous creation We're down to simply having it be a call to create_internal() so let's simply do that. The rest of the code is just a distraction. --- src/remote.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/remote.c b/src/remote.c index 891f0f2b6..44885bd17 100644 --- a/src/remote.c +++ b/src/remote.c @@ -313,14 +313,7 @@ on_error: int git_remote_create_anonymous(git_remote **out, git_repository *repo, const char *url, const char *fetch) { - int error; - git_remote *remote; - - if ((error = create_internal(&remote, repo, NULL, url, fetch)) < 0) - return error; - - *out = remote; - return 0; + return create_internal(out, repo, NULL, url, fetch); } int git_remote_dup(git_remote **dest, git_remote *source)