tSmall bug fixes. - plan9port - [fork] Plan 9 from user space
(HTM) git clone git://src.adamsgaard.dk/plan9port
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 8c6f0e8ab423f508fc0ce0532c1006b13fc35089
(DIR) parent 15680d56a6c6e15921d958aa6006825c2cd20bf8
(HTM) Author: rsc <devnull@localhost>
Date: Fri, 5 Mar 2004 05:58:48 +0000
Small bug fixes.
Diffstat:
M src/libframe/frbox.c | 2 +-
M src/libthread/channel.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
---
(DIR) diff --git a/src/libframe/frbox.c b/src/libframe/frbox.c
t@@ -116,7 +116,7 @@ void
chopbox(Frame *f, Frbox *b, int n) /* drop first n chars; no allocation done */
{
char *p;
-
+
if(b->nrune<0 || b->nrune<n)
drawerror(f->display, "chopbox");
p = (char*)runeindex(b->ptr, n);
(DIR) diff --git a/src/libthread/channel.c b/src/libthread/channel.c
t@@ -201,8 +201,8 @@ _threadnalt++;
}else{
altexec(a, s); /* unlocks chanlock, does splx */
}
- t->chan = Channone;
-_threadnalt++;
+ if(t)
+ t->chan = Channone;
return a - alts;
}