MCPcopy Create free account
hub / github.com/ading2210/linuxpdf / file_buffer_resize

Function file_buffer_resize

tinyemu/fs_net.c:283–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281}
282
283int file_buffer_resize(FileBuffer *bs, size_t new_size)
284{
285 uint8_t *new_data;
286 new_data = realloc(bs->data, new_size);
287 if (!new_data && new_size != 0)
288 return -1;
289 bs->data = new_data;
290 bs->allocated_size = new_size;
291 return 0;
292}
293
294void file_buffer_write(FileBuffer *bs, size_t offset, const uint8_t *buf,
295 size_t size)

Callers 4

fs_open_wgetFunction · 0.85
fs_truncateFunction · 0.85
bf_add_blockFunction · 0.85
bf_rw_async1Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected