Skip to content

Commit

Permalink
Fix lseek(2) calls with args 2 and 3 swapped
Browse files Browse the repository at this point in the history
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Dana How authored and Junio C Hamano committed Apr 5, 2007
1 parent 79ee194 commit b5da246
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion http-fetch.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion http-push.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit b5da246

Please sign in to comment.