X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=inline;f=src%2Fpfm-write.c;h=359f0440159480c26d9d40264ccc1079e85bb232;hb=2ca4a5735ccbbe66ae2277faf6aa47e2bb83bfab;hp=cf815e4f8064b1766408b3d7bcadfb524804f713;hpb=3a7fba81ceae5b049d0f7d671e9e3c3c43bbf703;p=pspp diff --git a/src/pfm-write.c b/src/pfm-write.c index cf815e4f80..359f044015 100644 --- a/src/pfm-write.c +++ b/src/pfm-write.c @@ -136,8 +136,9 @@ lossage: /* Write NBYTES starting at BUF to the portable file represented by H. Break lines properly every 80 characters. */ static int -bufwrite (struct file_handle *h, const void *buf, size_t nbytes) +bufwrite (struct file_handle *h, const void *buf_, size_t nbytes) { + const char *buf = buf_; struct pfm_fhuser_ext *ext = h->ext; assert (buf != NULL); @@ -153,7 +154,7 @@ bufwrite (struct file_handle *h, const void *buf, size_t nbytes) goto lossage; nbytes -= n; - *((char **) &buf) += n; + buf += n; ext->lc = 0; }