[GRASS-dev] is `initialized' initialized in HTML_Driver ()?
Paul Kelly
paul-grass at stjohnspoint.co.uk
Sun Oct 12 11:17:27 EDT 2008
On Sun, 12 Oct 2008, Ivan Shmakov wrote:
> Doesn't C require an explicit initial value for `initialized'
> here?
Well, as it is a static variable it will be initialised to zero.
>
> $ nl -ba grass-trunk-r33586/lib/htmldriver/Driver.c
> ...
> 20 const struct driver *HTML_Driver(void)
> 21 {
> 22 static struct driver drv;
> 23 static int initialized;
> 24
> 25 if (initialized)
> 26 return &drv;
> ...
> $
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev
>
>
More information about the grass-dev
mailing list