* xmlBufAddLen: * @buf: the buffer * @len: the size which were added at the end * * Sometime data may be added at the end of the buffer without * using the xmlBuf APIs that is used to expand the used space * and set the zero terminating at the end of the buffer * * Returns -1 in case of error and 0 otherwise */
| 526 | * Returns -1 in case of error and 0 otherwise |
| 527 | */ |
| 528 | int |
| 529 | xmlBufAddLen(xmlBufPtr buf, size_t len) { |
| 530 | if ((buf == NULL) || (buf->error)) |
| 531 | return(-1); |
| 532 | CHECK_COMPAT(buf) |
| 533 | if (len >= (buf->size - buf->use)) |
| 534 | return(-1); |
| 535 | buf->use += len; |
| 536 | buf->content[buf->use] = 0; |
| 537 | UPDATE_COMPAT(buf) |
| 538 | return(0); |
| 539 | } |
| 540 | |
| 541 | /** |
| 542 | * xmlBufLength: |
no outgoing calls
no test coverage detected