variable init

Andriy Gapon avg at FreeBSD.org
Mon Aug 1 12:55:58 UTC 2011


on 01/08/2011 10:09 Andrew Thompson said the following:
> Hi,
> 
> Looking at,
> 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=159345
> 
> The lock is a global variable, declared as
> 
> static struct mtx       lagg_list_mtx;
> 
> I would expect this to be zeroed memory, is this guaranteed?

Variables with static storage should be initialized with all zeros.


-- 
Andriy Gapon


More information about the freebsd-current mailing list