[hackers] [libixp] Don't modify the fid offset in _pwrite.

From: Anthony Martin <ality_AT_suckless.org>
Date: Sun Nov 25 20:38:19 2007

changeset: 80:8983143c6000
user: Anthony Martin <ality_AT_suckless.org>
date: Sun Nov 25 11:11:01 2007 -0800
summary: Don't modify the fid offset in _pwrite.

diff -r 70ea59334d41 -r 8983143c6000 libixp/client.c
--- a/libixp/client.c Mon Nov 05 23:52:11 2007 +0900
+++ b/libixp/client.c Sun Nov 25 11:11:01 2007 -0800
@@ -424,13 +424,13 @@ _pwrite(IxpCFid *f, void *buf, long coun
                 n = min(count-len, f->iounit);
                 fcall.type = TWrite;
                 fcall.fid = f->fid;
- fcall.offset = f->offset;
+ fcall.offset = offset;
                 fcall.data = buf + len;
                 fcall.count = n;
                 if(dofcall(f->client, &fcall) == 0)
                         return -1;
 
- f->offset += fcall.count;
+ offset += fcall.count;
                 len += fcall.count;
 
                 ixp_freefcall(&fcall);
Received on Sun Nov 25 2007 - 20:38:19 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:58:52 UTC