summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-09-29 07:24:47 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-09-29 07:24:47 -0700
commitc84defd9b6484dff60e513ad79e361c44aadcc0e (patch)
tree48ad695f79cd6f2124967f8c765029b80d327ba8
parentc168659d2b3376effcfee77acf4fc4a50c4ae787 (diff)
downloadtxr-c84defd9b6484dff60e513ad79e361c44aadcc0e.tar.gz
txr-c84defd9b6484dff60e513ad79e361c44aadcc0e.tar.bz2
txr-c84defd9b6484dff60e513ad79e361c44aadcc0e.zip
C++ fix in poll wrapper.
* sysif.c (poll_wrap): We must coerce mem_t * return value of chk_calloc, not convert.
-rw-r--r--sysif.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sysif.c b/sysif.c
index 6f6ce7c0..c8931895 100644
--- a/sysif.c
+++ b/sysif.c
@@ -711,8 +711,7 @@ static val poll_wrap(val poll_list, val timeout_in)
{
nfds_t i, len = c_num(length(poll_list));
val iter;
- struct pollfd *pfd = convert(struct pollfd *,
- chk_calloc(len, sizeof *pfd));
+ struct pollfd *pfd = coerce(struct pollfd *, chk_calloc(len, sizeof *pfd));
val timeout = default_arg(timeout_in, negone);
int res;