[PATCH v2] lib/slab: introduce sl_allocz() function and use it in Babel

Toke Høiland-Jørgensen toke at toke.dk
Mon Nov 23 12:51:52 CET 2020


Andreas Rammhold <andreas at rammhold.de> writes:

> On 11:33 23.11.20, Toke Høiland-Jørgensen wrote:
>> Andreas Rammhold <andreas at rammhold.de> writes:
>> 
>> > On 11:07 23.11.20, Toke Høiland-Jørgensen wrote:
>> >> +void *
>> >> +sl_allocz(slab *s)
>> >> +{
>> >> +  void *obj = sl_alloc(s);
>> >> +  memset(obj, 0, s->size);
>> >> +  return obj;
>> >> +}
>> >> +
>> >
>> > This is the same function name and (almost same) implementation as
>> > further down in this patch. Did you forget to remove it?
>> 
>> No, look at the ifdefs - this one is for the FAKE_SLAB case :)
>
> Ok, I got confused by the mail highlighting. In a proper editor it is
> more obvious.

Hehe, yeah, I often miss those ifdef sections entirely and end up
sending out patches that don't compile at all if the config is wrong :)

-Toke



More information about the Bird-users mailing list