On Thu, Mar 30, 2023 at 03:18:36PM +0200, Claudio Jeker wrote: > This diff cleans up extract_prefix(). The main point is to abort before > writing anything.
That's good. > PREFIX_SIZE() includes the length byte so exclude that again. > I think overall the function is more readable now. Yes, I agree that it's easier to follow. I'd probably unwrap the definition to read: static int extract_prefix(u_char *p, uint16_t len, void *va, uint8_t pfxlen, uint8_t max) Either way, ok