MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlBufGrow

Function xmlBufGrow

ThirdParty/libxml2/vtklibxml2/buf.c:442–453  ·  view source on GitHub ↗

* xmlBufGrow: * @buf: the buffer * @len: the minimum free size to allocate * * Grow the available space of an XML buffer, @len is the target value * This is been kept compatible with xmlBufferGrow() as much as possible * * Returns -1 in case of error or the length made available otherwise */

Source from the content-addressed store, hash-verified

440 * Returns -1 in case of error or the length made available otherwise
441 */
442int
443xmlBufGrow(xmlBufPtr buf, int len) {
444 size_t ret;
445
446 if ((buf == NULL) || (len < 0)) return(-1);
447 if (len == 0)
448 return(0);
449 ret = xmlBufGrowInternal(buf, len);
450 if (buf->error != 0)
451 return(-1);
452 return(ret > INT_MAX ? INT_MAX : ret);
453}
454
455/**
456 * xmlBufDump:

Callers 4

xmlCharEncInputFunction · 0.85
xmlCharEncOutputFunction · 0.85
xmlParserInputBufferGrowFunction · 0.85

Calls 1

xmlBufGrowInternalFunction · 0.85

Tested by

no test coverage detected