提交 2550fc4f authored 作者: Michael Jerris's avatar Michael Jerris

fix build

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@659 a93c3328-9c30-0410-af19-c9cd2b2d52af
上级 8e2c4ebc
......@@ -9,7 +9,9 @@ struct helper {
zap_status_t my_write_sample(int16_t *buf, zap_size_t buflen, void *user_data)
{
struct helper *foo = (struct helper *) user_data;
write(foo->fd, buf, buflen * 2);
size_t len;
len = write(foo->fd, buf, buflen * 2);
if (!len) return ZAP_FAIL;
foo->wrote += buflen * 2;
return ZAP_SUCCESS;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论