mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-24 11:41:58 +00:00
libthread: fix nbrecvul, recvul to match man page, Plan 9
They return 0 on failure, not -1. Bug introduced in my original libthread-for-Unix code. Fixes #230.
This commit is contained in:
parent
93f9789c04
commit
369923f6fc
1 changed files with 2 additions and 2 deletions
|
@ -397,7 +397,7 @@ chanrecvul(Channel *c)
|
|||
|
||||
if(_chanop(c, CHANRCV, &val, 1) > 0)
|
||||
return val;
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -413,5 +413,5 @@ channbrecvul(Channel *c)
|
|||
|
||||
if(_chanop(c, CHANRCV, &val, 0) > 0)
|
||||
return val;
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue