Hi, On 07/07/18 20:45, Steffan Karger wrote: > Hi,
[cut] >> +static void >> +free_buf_gc(struct buffer *buf, struct gc_arena *gc) >> +{ >> + if (gc) >> + { >> + struct gc_entry **e = &gc->list; >> + >> + while (*e) >> + { >> + /* check if this object is the one we want to delete */ >> + if ((uint8_t *)((*e) + sizeof(*e)) == buf->data) > > I think this should be sizeof(**e). > Right! Thanks for catching this! [cut] >> +/** >> + * buffer_read_from_file - copy the content of a file into a buffer >> + * >> + * @param file path to the file to read >> + * @param gc the garbage collector to use when allocating the >> buffer. It >> + * passed to alloc_buf_gc() and therefore can be NULL. > > It *is* passed ? > of course :-) thanks! [cut] > > Otherwise, this looks good. > Cool, thanks! I will send v4 with these small fixes and a unit test for the buf_free_gc() function. Cheers, -- Antonio Quartulli
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel