{"thread":{"id":"7530","subject":"[PATCH 01/13] Fix lseek(2) calls with args 2 and 3 swapped","startedAt":"2007-04-05T22:23:29Z","lastAt":"2007-04-05T23:00:17Z","messageCount":2,"participants":["Dana How","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":13},"messages":[{"id":"38742","messageId":"56b7f5510704051523l30c422c6ie2ba561577fecb73@mail.gmail.com","threadId":"7530","inReplyTo":null,"subject":"[PATCH 01/13] Fix lseek(2) calls with args 2 and 3 swapped","fromName":"Dana How","fromEmail":"danahow@gmail.com","sentAt":"2007-04-05T22:23:29Z","receivedAt":"2007-04-05T22:23:29Z","isPatch":true,"sender":{"key":"danahow@gmail.com","avatar":null},"body":"---\n http-fetch.c |    2 +-\n http-push.c  |    2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\n-- \nDana L. How  danahow@gmail.com  +1 650 804 5991 cell\n\n\nFrom afaa3fa754d8abc296261275339ec50182983dd7 Mon Sep 17 00:00:00 2001\nFrom: Dana How <how@deathvalley.cswitch.com>\nDate: Thu, 5 Apr 2007 12:05:57 -0700\nSubject: [PATCH 01/13] Fix lseek(2) calls with args 2 and 3 swapped\n\n---\n http-fetch.c |    2 +-\n http-push.c  |    2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/http-fetch.c b/http-fetch.c\nindex 557b403..09baedc 100644\n--- a/http-fetch.c\n+++ b/http-fetch.c\n@@ -198,7 +198,7 @@ static void start_object_request(struct object_request *obj_req)\n \t\tSHA1_Init(&obj_req->c);\n \t\tif (prev_posn>0) {\n \t\t\tprev_posn = 0;\n-\t\t\tlseek(obj_req->local, SEEK_SET, 0);\n+\t\t\tlseek(obj_req->local, 0, SEEK_SET);\n \t\t\tftruncate(obj_req->local, 0);\n \t\t}\n \t}\ndiff --git a/http-push.c b/http-push.c\nindex 724720c..e3f7675 100644\n--- a/http-push.c\n+++ b/http-push.c\n@@ -312,7 +312,7 @@ static void start_fetch_loose(struct transfer_request *request)\n \t\tSHA1_Init(&request->c);\n \t\tif (prev_posn>0) {\n \t\t\tprev_posn = 0;\n-\t\t\tlseek(request->local_fileno, SEEK_SET, 0);\n+\t\t\tlseek(request->local_fileno, 0, SEEK_SET);\n \t\t\tftruncate(request->local_fileno, 0);\n \t\t}\n \t}\n-- \n1.5.1.rc2.18.g9c88-dirty\n\n"},{"id":"38758","messageId":"7vd52imnpa.fsf@assigned-by-dhcp.cox.net","threadId":"7530","inReplyTo":"56b7f5510704051523l30c422c6ie2ba561577fecb73@mail.gmail.com","subject":"Re: [PATCH 01/13] Fix lseek(2) calls with args 2 and 3 swapped","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-04-05T23:00:17Z","receivedAt":"2007-04-05T23:00:17Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Good fixes. Thanks.\n\nAlthough I suspect they are no-op in practice (SEEK_SET is\nprobably zero anyway).  Will apply to 'maint' to be included in\nv1.5.1.1.\n"}]}