diff options
author | Michael Haggerty <mhagger@alum.mit.edu> | 2016-09-04 18:08:07 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-09-09 15:28:12 -0700 |
commit | f6e75467ca83f116e96525c33d9b669e47f310fd (patch) | |
tree | 1d9dd0c1ffb6d4dbb1b932fe95876134922370dc /refs | |
parent | 2880d16f09635f9d43247b27fd7e6508b992e599 (diff) | |
download | git-f6e75467ca83f116e96525c33d9b669e47f310fd.tar.gz |
resolve_gitlink_ref(): eliminate temporary variable
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs')
-rw-r--r-- | refs/files-backend.c | 5 |
1 files changed, 2 insertions, 3 deletions
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); } /* |