提交 8df4cd46 编写于 作者: K Kyle Chisholm 提交者: Max Bruckner

more concise return

上级 3917fb52
......@@ -894,14 +894,12 @@ char *cJSON_PrintBuffered(const cJSON *item, int prebuffer, cjbool fmt)
int cJSON_PrintPreallocated(cJSON *item,char *buf, const int len, const cjbool fmt)
{
char *out;
printbuffer p;
p.buffer = buf;
p.length = len;
p.offset = 0;
p.noalloc = true;
out = print_value(item,0,fmt,&p);
return (out != buf ? -1 : 0);
return print_value(item,0,fmt,&p) != NULL;
}
/* Parser core - when encountering text, process appropriately. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册