MCPcopy Index your code
hub / github.com/git/git / xsnprintf

Function xsnprintf

wrapper.c:666–680  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

664}
665
666int xsnprintf(char *dst, size_t max, const char *fmt, ...)
667{
668 va_list ap;
669 int len;
670
671 va_start(ap, fmt);
672 len = vsnprintf(dst, max, fmt, ap);
673 va_end(ap);
674
675 if (len < 0)
676 die(_("unable to format message: %s"), fmt);
677 if (len >= max)
678 BUG("attempt to snprintf into too-small buffer");
679 return len;
680}
681
682void write_file_buf(const char *path, const char *buf, size_t len)
683{

Callers 15

init_dbFunction · 0.85
open_output_fdFunction · 0.85
find_first_mergesFunction · 0.85
prepare_headerFunction · 0.85
write_extended_headerFunction · 0.85
write_tar_entryFunction · 0.85
ai_nameFunction · 0.85
compile_regexp_failedFunction · 0.85
show_line_headerFunction · 0.85

Calls 1

dieFunction · 0.70

Tested by 6

test__run_describeFunction · 0.68
perf_hashmapFunction · 0.68
inherit_handleFunction · 0.68
dump_cache_treeFunction · 0.68
test_functionFunction · 0.68