summaryrefslogtreecommitdiff
path: root/lang/js/patches/patch-aa
blob: 36e8cfad110b0bf9201c7d307d47c2d7d1c2771c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
$NetBSD: patch-aa,v 1.2 2015/12/29 23:34:49 dholland Exp $

Avoid illegal lvalue casts.

--- src/iostream.c.orig	1998-11-25 10:06:10.000000000 +0200
+++ src/iostream.c
@@ -233,7 +233,7 @@ js_iostream_read (JSIOStream *stream, vo
 
 	  stream->bufpos += got;
 	  size -= got;
-	  (unsigned char *) ptr += got;
+	  ptr = (unsigned char *) ptr + got;
 	  total += got;
 	}
       else
@@ -290,7 +290,7 @@ js_iostream_write (JSIOStream *stream, v
       stream->data_in_buf += space;
       total += space;
       size -= space;
-      (unsigned char *) ptr += space;
+      ptr = (unsigned char *) ptr + space;
 
       /* Now the buffer contains buffered write data. */
       stream->writep = 1;