MCPcopy Create free account
hub / github.com/RsyncProject/rsync / reduce_iobuf_size

Function reduce_iobuf_size

io.c:480–495  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

478}
479
480void reduce_iobuf_size(xbuf *out, size_t new_size)
481{
482 if (new_size < out->size) {
483 /* Avoid weird buffer interactions by only outputting this to stderr. */
484 if (msgs2stderr == 1 && DEBUG_GTE(IO, 4)) {
485 const char *name = out == &iobuf.out ? "iobuf.out"
486 : out == &iobuf.msg ? "iobuf.msg"
487 : NULL;
488 if (name) {
489 rprintf(FINFO, "[%s] reduced size of %s (-%d)\n",
490 who_am_i(), name, (int)(out->size - new_size));
491 }
492 }
493 out->size = new_size;
494 }
495}
496
497void restore_iobuf_size(xbuf *out)
498{

Callers 3

perform_ioFunction · 0.85
send_msgFunction · 0.85
iconvbufsFunction · 0.85

Calls 2

rprintfFunction · 0.70
who_am_iFunction · 0.70

Tested by

no test coverage detected