![leitner](/assets/img/avatar_default.png)
remove unused #include in iob_reset if iob_addfile_close fails, it now closes the fd if iob_addbuf_munmap fails, it now munmaps the buf if iob_addbuf_free fails, it now frees the buf some win32 cross-compile fixes for iarray
16 lines
320 B
C
16 lines
320 B
C
#include <stdlib.h>
|
|
#include "byte.h"
|
|
#include "iob_internal.h"
|
|
|
|
void iob_reset(io_batch* b) {
|
|
unsigned long i,l;
|
|
iob_entry* x=array_start(&b->b);
|
|
l=array_length(&b->b,sizeof(iob_entry));
|
|
for (i=0; i<l; ++i) {
|
|
if (x[i].cleanup)
|
|
x[i].cleanup(x+i);
|
|
}
|
|
array_reset(&b->b);
|
|
byte_zero(b,sizeof(*b));
|
|
}
|