Skip to content

Commit b5da246

Browse files
Dana HowJunio C Hamano
authored andcommitted
Fix lseek(2) calls with args 2 and 3 swapped
Signed-off-by: Junio C Hamano <[email protected]>
1 parent 79ee194 commit b5da246

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

http-fetch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ static void start_object_request(struct object_request *obj_req)
198198
SHA1_Init(&obj_req->c);
199199
if (prev_posn>0) {
200200
prev_posn = 0;
201-
lseek(obj_req->local, SEEK_SET, 0);
201+
lseek(obj_req->local, 0, SEEK_SET);
202202
ftruncate(obj_req->local, 0);
203203
}
204204
}

http-push.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ static void start_fetch_loose(struct transfer_request *request)
312312
SHA1_Init(&request->c);
313313
if (prev_posn>0) {
314314
prev_posn = 0;
315-
lseek(request->local_fileno, SEEK_SET, 0);
315+
lseek(request->local_fileno, 0, SEEK_SET);
316316
ftruncate(request->local_fileno, 0);
317317
}
318318
}

0 commit comments

Comments
 (0)