[U-Boot] [PATCH] EXT4
Stefan Kristiansson
stefan.kristiansson at saunalahti.fi
Tue May 22 08:05:44 CEST 2012
On Tue, May 22, 2012 at 02:55:57PM +0900, Jorgen Lundman wrote:
>
> ERROR: do not initialise globals to 0 or NULL
> #596: FILE: fs/zfs/zfs.c:33:
> +block_dev_desc_t *zfs_dev_desc = NULL;
>
> That strikes me as dangerous. One lets you fail gracefully (Sorry, X
> has not been initialised) and the other is just a plain crash. I
> find crashes to be very ugly, even if it is only reachable by other
> developers.
>
Globals are per se initialised to 0,
so there is no need to explicitly initialise them.
As a consequence, it is neither dangerous to omit the initialisation.
Stefan
More information about the U-Boot
mailing list