[RFC 1/5] Remove unnecessary local in get_ref_sha1.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Remove unnecessary local in get_ref_sha1.

Signed-off-by: Shawn O. Pearce <spearce@xxxxxxxxxxx>

---

 refs.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

339dddea51656af46f6c8a2fba7f50d96ae2a434
diff --git a/refs.c b/refs.c
index 6c91ae6..0f3491f 100644
--- a/refs.c
+++ b/refs.c
@@ -220,12 +220,9 @@ static char *ref_lock_file_name(const ch
 
 int get_ref_sha1(const char *ref, unsigned char *sha1)
 {
-	const char *filename;
-
 	if (check_ref_format(ref))
 		return -1;
-	filename = git_path("refs/%s", ref);
-	return read_ref(filename, sha1);
+	return read_ref(git_path("refs/%s", ref), sha1);
 }
 
 static int lock_ref_file(const char *filename, const char *lock_filename,
-- 
1.3.2.g7278

-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]