MCPcopy Create free account
hub / github.com/git/git / strbuf_append_ext_header_uint

Function strbuf_append_ext_header_uint

archive-tar.c:182–191  ·  view source on GitHub ↗

* Like strbuf_append_ext_header, but for numeric values. */

Source from the content-addressed store, hash-verified

180 * Like strbuf_append_ext_header, but for numeric values.
181 */
182static void strbuf_append_ext_header_uint(struct strbuf *sb,
183 const char *keyword,
184 uintmax_t value)
185{
186 char buf[40]; /* big enough for 2^128 in decimal, plus NUL */
187 int len;
188
189 len = xsnprintf(buf, sizeof(buf), "%"PRIuMAX, value);
190 strbuf_append_ext_header(sb, keyword, buf, len);
191}
192
193static unsigned int ustar_header_chksum(const struct ustar_header *header)
194{

Callers 2

write_tar_entryFunction · 0.85

Calls 2

xsnprintfFunction · 0.85
strbuf_append_ext_headerFunction · 0.85

Tested by

no test coverage detected