From 30d6c6eabfefed330bebbed9126fe21bf349fd6b Mon Sep 17 00:00:00 2001 From: Michael Haggerty Date: Fri, 21 Feb 2014 17:32:05 +0100 Subject: sha1_file_name(): declare to return a const string Change the return value of sha1_file_name() to (const char *). (Callers have no business mucking about here.) Change callers accordingly, deleting a few superfluous temporary variables along the way. Signed-off-by: Michael Haggerty Signed-off-by: Junio C Hamano --- http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'http.c') diff --git a/http.c b/http.c index 70eaa26e88..faa9dc8f82 100644 --- a/http.c +++ b/http.c @@ -1384,7 +1384,7 @@ struct http_object_request *new_http_object_request(const char *base_url, unsigned char *sha1) { char *hex = sha1_to_hex(sha1); - char *filename; + const char *filename; char prevfile[PATH_MAX]; int prevlocal; char prev_buf[PREV_BUF_SIZE]; -- cgit v1.2.1