| 132 | } |
| 133 | |
| 134 | void set_packet_header(char *buf, int size) |
| 135 | { |
| 136 | static char hexchar[] = "0123456789abcdef"; |
| 137 | |
| 138 | #define hex(a) (hexchar[(a) & 15]) |
| 139 | buf[0] = hex(size >> 12); |
| 140 | buf[1] = hex(size >> 8); |
| 141 | buf[2] = hex(size >> 4); |
| 142 | buf[3] = hex(size); |
| 143 | #undef hex |
| 144 | } |
| 145 | |
| 146 | static void format_packet(struct strbuf *out, const char *prefix, |
| 147 | const char *fmt, va_list args) |
no outgoing calls
no test coverage detected