From f6e75467ca83f116e96525c33d9b669e47f310fd Mon Sep 17 00:00:00 2001 From: Michael Haggerty Date: Sun, 4 Sep 2016 18:08:07 +0200 Subject: resolve_gitlink_ref(): eliminate temporary variable Signed-off-by: Michael Haggerty Signed-off-by: Junio C Hamano --- refs/files-backend.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'refs') diff --git a/refs/files-backend.c b/refs/files-backend.c index a9ca003bae..d56fc15163 100644 --- a/refs/files-backend.c +++ b/refs/files-backend.c @@ -1387,7 +1387,7 @@ static int resolve_gitlink_ref_recursive(struct ref_cache *refs, int resolve_gitlink_ref(const char *path, const char *refname, unsigned char *sha1) { - int len = strlen(path), retval; + int len = strlen(path); struct strbuf submodule = STRBUF_INIT; struct ref_cache *refs; @@ -1404,8 +1404,7 @@ int resolve_gitlink_ref(const char *path, const char *refname, unsigned char *sh } strbuf_release(&submodule); - retval = resolve_gitlink_ref_recursive(refs, refname, sha1, 0); - return retval; + return resolve_gitlink_ref_recursive(refs, refname, sha1, 0); } /* -- cgit v1.2.3