Code

Fix lseek(2) calls with args 2 and 3 swapped
authorDana How <how@deathvalley.cswitch.com>
Thu, 5 Apr 2007 19:05:57 +0000 (12:05 -0700)
committerJunio C Hamano <junkio@cox.net>
Thu, 5 Apr 2007 22:39:12 +0000 (15:39 -0700)
Signed-off-by: Junio C Hamano <junkio@cox.net>
http-fetch.c
http-push.c

index 557b40322f22b77a81140ff8f29b2b2be0505581..09baedc18ae320a2f09fa61d9065bedb69c02a41 100644 (file)
@@ -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);
                }
        }
index 724720c562ab6da2b02e91b69f5365bc7bfee4f4..e3f767582bfc71fc3d1b90be8fa76ab3ad7e1664 100644 (file)
@@ -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);
                }
        }