[PATCH] bssgp: Fix call to llist_entry in fc_queue_timer_cfg

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Mike McTernan (wavemobile) mike.mcternan at wavemobile.com
Fri May 1 15:09:59 UTC 2015


Hi Holger,

> good point. I thought we have a void* in our hands but we do have the
> llist_head here. The container_of macro in linux 2.6.12-rc2 (initial git
> commit) didn’t cast either so we should definitely take your commit.

Great!  I subsequently checked too, and couldn't find a version of Linux with the cast. 

The other change to perhaps consider is what happens when the passed ptr is null.  In my projects I tend to use a version of containerof that will return NULL in that case.  This is both convenient for NULL checks and ensures we don't end up with a pointer to the top of memory (which will _probably_ segfault so would have been detected). 

> Our jenkins only submits HEAD as build to coverity. 

Cool!  I just found the Jenkins pages... that's nice to know, thanks.
	
Kind Regards,

Mike


More information about the OpenBSC mailing list