Re: iked, ibuf_length vs ibuf_size

2023-08-03 Thread Theo Buehler
On Thu, Aug 03, 2023 at 03:42:46PM +0200, Claudio Jeker wrote: > iked has a special version of ibuf_size() called ibuf_length(). In the > long run I want to remove this special case. The problem is that > ibuf_length(NULL) returns 0 while ibuf_size() fails. > Allowing the NULL pointer here results

iked, ibuf_length vs ibuf_size

2023-08-03 Thread Claudio Jeker
iked has a special version of ibuf_size() called ibuf_length(). In the long run I want to remove this special case. The problem is that ibuf_length(NULL) returns 0 while ibuf_size() fails. Allowing the NULL pointer here results in bad code since it is no longer obvious if a buffer is initalised or