* Like strbuf_append_ext_header, but for numeric values. */
| 180 | * Like strbuf_append_ext_header, but for numeric values. |
| 181 | */ |
| 182 | static 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 | |
| 193 | static unsigned int ustar_header_chksum(const struct ustar_header *header) |
| 194 | { |
no test coverage detected