Re: Newbie ask for help: cramfs port to isofs

Nick Holloway
2001-02-20T09:55:43Z

ankry@pg.gda.pl (Andrzej Krzysztofowicz) writes:
> "zhaoway wrote:"
> > - int len;
> > - int map;
> > + int len = 0;
>
> This will be the most probably rejected.
> Zero initializers are intentionally removed from the code to decrease
> the kernel image size.

A little knowledge is a dangerous thing.

The zero initializers can be removed from _static_ variables (those not
within function scope), where the initialization to zero is guarenteed.

In the case above, the variable being initialized is an automatic variable
(allocated on the stack), and so needs to be initialized.

--
`O O' | Nick.Holloway@pyrites.org.uk
// ^ \\ | http://www.pyrites.org.uk/