From: Dana How Date: Thu, 5 Apr 2007 19:05:57 +0000 (-0700) Subject: Fix lseek(2) calls with args 2 and 3 swapped X-Git-Tag: v1.5.1.1~26 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b5da24679ec73f458988523dce9dd17b4e9b0e02;p=git.git Fix lseek(2) calls with args 2 and 3 swapped Signed-off-by: Junio C Hamano --- diff --git a/http-fetch.c b/http-fetch.c index 557b40322..09baedc18 100644 --- a/http-fetch.c +++ b/http-fetch.c @@ -198,7 +198,7 @@ static void start_object_request(struct object_request *obj_req) SHA1_Init(&obj_req->c); if (prev_posn>0) { prev_posn = 0; - lseek(obj_req->local, SEEK_SET, 0); + lseek(obj_req->local, 0, SEEK_SET); ftruncate(obj_req->local, 0); } } diff --git a/http-push.c b/http-push.c index 724720c56..e3f767582 100644 --- a/http-push.c +++ b/http-push.c @@ -312,7 +312,7 @@ static void start_fetch_loose(struct transfer_request *request) SHA1_Init(&request->c); if (prev_posn>0) { prev_posn = 0; - lseek(request->local_fileno, SEEK_SET, 0); + lseek(request->local_fileno, 0, SEEK_SET); ftruncate(request->local_fileno, 0); } }