mirror of
https://github.com/json-c/json-c.git
synced 2026-03-26 08:29:06 +08:00
add the disabling formatting coments and adjust the partial code manuly
This commit is contained in:
@@ -124,9 +124,10 @@ int sprintbuf(struct printbuf *p, const char *msg, ...)
|
||||
size = vsnprintf(buf, 128, msg, ap);
|
||||
va_end(ap);
|
||||
/* if string is greater than stack buffer, then use dynamic string
|
||||
with vasprintf. Note: some implementation of vsnprintf return -1
|
||||
if output is truncated whereas some return the number of bytes that
|
||||
would have been written - this code handles both cases. */
|
||||
* with vasprintf. Note: some implementation of vsnprintf return -1
|
||||
* if output is truncated whereas some return the number of bytes that
|
||||
* would have been written - this code handles both cases.
|
||||
*/
|
||||
if(size == -1 || size > 127) {
|
||||
va_start(ap, msg);
|
||||
if((size = vasprintf(&t, msg, ap)) < 0) { va_end(ap); return -1; }
|
||||
|
||||
Reference in New Issue
Block a user