On 29 March 2016 at 07:52, Willy Tarreau <[email protected]> wrote: > On Sun, Mar 27, 2016 at 05:41:08PM +0200, Vincent Bernat wrote: >> Willy, you always cast for functions returning void*. This is not >> needed. For example: >> >> l = (struct listener *)calloc(1, sizeof(struct listener)); >> >> Could be just: >> >> l = calloc(1, sizeof(struct listener)); > > I definitely agree.
Strictly speaking, that is allowed in C, but *not* in C++. Not that I personally care in any way about the ability to compile on C++ compilers, and as far as I'm concerned making life harder for C++-land is a good thing. But it might be an issue if someone tries to compile HAProxy on a technically C but actually C++ compiler like VC++. Cheers, Maciej

