Re: bgpd: struct mrt vs struct mrt_config confusion

2021-01-04 Thread Theo Buehler
On Mon, Jan 04, 2021 at 12:23:35PM +0100, Claudio Jeker wrote: > On Mon, Jan 04, 2021 at 12:09:46PM +0100, Theo Buehler wrote: > > Pointed out by llvm scan-build. mrt_config is much larger (> 10x). As > > far as I can tell, this isn't bad. It just overallocates and copies a > > lot of zeroes thanks

Re: bgpd: struct mrt vs struct mrt_config confusion

2021-01-04 Thread Claudio Jeker
On Mon, Jan 04, 2021 at 12:09:46PM +0100, Theo Buehler wrote: > Pointed out by llvm scan-build. mrt_config is much larger (> 10x). As > far as I can tell, this isn't bad. It just overallocates and copies a > lot of zeroes thanks to the calloc() in parse.y. > > Perhaps it would be better to use siz

bgpd: struct mrt vs struct mrt_config confusion

2021-01-04 Thread Theo Buehler
Pointed out by llvm scan-build. mrt_config is much larger (> 10x). As far as I can tell, this isn't bad. It just overallocates and copies a lot of zeroes thanks to the calloc() in parse.y. Perhaps it would be better to use sizeof(*xm) instead. Regress passes with the Makefile diff at the end (is