chiark / gitweb /
chan.c (chan_open): Actually initialize the error indicator.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 9 Jun 2018 16:02:50 +0000 (17:02 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 9 Jun 2018 16:03:10 +0000 (17:03 +0100)
Thank you, valgrind, for spotting this.

chan.c

diff --git a/chan.c b/chan.c
index 5fbecb1605e4d3eef8e89bd34ce936b2c18402fb..9aa42a5c4290d87b3d655740051c10bb95e35eda 100644 (file)
--- a/chan.c
+++ b/chan.c
@@ -240,6 +240,7 @@ void chan_open(chan *c, int from, int to,
   c->base = 0;
   c->len = 0;
   c->f = 0;
+  c->err = 0;
 
   sel_initfile(sel, &c->r, from, SEL_READ, readchan, c);
   sel_addfile(&c->r);