@matheusbsbs / matheus-bagliano / commits / b5da24679e
Fork 0

Fix lseek(2) calls with args 2 and 3 swapped

Signed-off-by: Junio C Hamano <junkio@cox.net>

Dana How committed Apr 5, 2007 at 12:05 UTC b5da24679ec73f458988523dce9dd17b4e9b0e02
2 files changed +2 -2
http-fetch.c
+1 -1
@@ -198,7 +198,7 @@ static void start_object_request(struct object_request *obj_req)
198 SHA1_Init(&obj_req->c);
199 if (prev_posn>0) {
200 prev_posn = 0;
201 - lseek(obj_req->local, SEEK_SET, 0);
201 + lseek(obj_req->local, 0, SEEK_SET);
202 ftruncate(obj_req->local, 0);
203 }
204 }
http-push.c
+1 -1
@@ -312,7 +312,7 @@ static void start_fetch_loose(struct transfer_request *request)
312 SHA1_Init(&request->c);
313 if (prev_posn>0) {
314 prev_posn = 0;
315 - lseek(request->local_fileno, SEEK_SET, 0);
315 + lseek(request->local_fileno, 0, SEEK_SET);
316 ftruncate(request->local_fileno, 0);
317 }
318 }