From: Mark Wooding Date: Wed, 01 Feb 2006 11:44:35 GMT Subject: [PATCH 5/9] http-fetch: Fix message reporting rename of object file. Message-ID: <20060201114435.5042.11777.stgit@metalzone.distorted.org.uk> In-Reply-To: <20060201112822.5042.41256.stgit@metalzone.distorted.org.uk> From: Mark Wooding move_temp_to_file returns 0 or -1. This is not a good thing to pass to strerror(3). Fortunately, someone already reported the error, so don't worry too much. Signed-off-by: Mark Wooding --- http-fetch.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/http-fetch.c b/http-fetch.c index 8656070..f1aac14 100644 --- a/http-fetch.c +++ b/http-fetch.c @@ -831,9 +831,8 @@ static int fetch_object(struct alt_base } else if (memcmp(obj_req->sha1, obj_req->real_sha1, 20)) { ret = error("File %s has bad hash\n", hex); } else if (obj_req->rename < 0) { - ret = error("unable to write sha1 filename %s: %s", - obj_req->filename, - strerror(obj_req->rename)); + ret = error("unable to write sha1 filename %s", + obj_req->filename); } release_object_request(obj_req);