D | genelf_debug.c | 46 buffer_ext_dump(struct buffer_ext *be, const char *msg) in buffer_ext_dump() argument 50 for (i = 0 ; i < be->cur_pos; i++) in buffer_ext_dump() 51 warnx("%4zu 0x%02x", i, (((char *)be->data)[i]) & 0xff); in buffer_ext_dump() 55 buffer_ext_add(struct buffer_ext *be, void *addr, size_t sz) in buffer_ext_add() argument 58 size_t be_sz = be->max_sz; in buffer_ext_add() 61 if ((be->cur_pos + sz) < be_sz) { in buffer_ext_add() 62 memcpy(be->data + be->cur_pos, addr, sz); in buffer_ext_add() 63 be->cur_pos += sz; in buffer_ext_add() 72 tmp = realloc(be->data, be_sz); in buffer_ext_add() 76 be->data = tmp; in buffer_ext_add() [all …]
|