summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-03-07 06:36:15 -0800
committerKaz Kylheku <kaz@kylheku.com>2016-03-07 06:36:15 -0800
commit6b252ddb8818fb7a5e7923c442d1a9022bc07b9d (patch)
tree486504b6743187b28e6bce8f64c1d494a1da8916
parentca5c17eb1acd8b3f0efb62d6952dfa8bf5551756 (diff)
downloadtxr-6b252ddb8818fb7a5e7923c442d1a9022bc07b9d.tar.gz
txr-6b252ddb8818fb7a5e7923c442d1a9022bc07b9d.tar.bz2
txr-6b252ddb8818fb7a5e7923c442d1a9022bc07b9d.zip
gc bugs: more instances of wrong mutations.
* socket.c (dgram_set_sock_peer): Assign to struct dgram_stream using using set macro. * stream.c (stdio_set_sock_peer): Assign to struct stdio_handle peer using set macro.
-rw-r--r--socket.c2
-rw-r--r--stream.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/socket.c b/socket.c
index 4e56334a..ab6b4e6c 100644
--- a/socket.c
+++ b/socket.c
@@ -564,7 +564,7 @@ static val dgram_set_sock_peer(val stream, val peer)
{
struct dgram_stream *d = coerce(struct dgram_stream *, stream->co.handle);
sockaddr_in(peer, d->family, &d->peer_addr, &d->pa_len);
- return d->peer = peer;
+ return set(mkloc(d->peer, stream), peer);
}
static_def(struct strm_ops dgram_strm_ops =
diff --git a/stream.c b/stream.c
index bca44769..90fbae8e 100644
--- a/stream.c
+++ b/stream.c
@@ -770,7 +770,7 @@ static val stdio_get_sock_peer(val stream)
static val stdio_set_sock_peer(val stream, val peer)
{
struct stdio_handle *h = coerce(struct stdio_handle *, stream->co.handle);
- return h->peer = peer;
+ return set(mkloc(h->peer, stream), peer);
}
#endif