[parted-devel] labels/*.c: Declare some static arrays to be "const".

Otavio Salvador otavio at debian.org
Wed Mar 7 19:46:37 CET 2007


Jim Meyering <jim at meyering.net> writes:

> Making these tables "const" lets the compiler/linker put the values
> in read-only storage.  Not only more efficient in some cases, but
> also protects against accidental modification.
>
> 	Declare some static arrays to be "const".
> 	* libparted/labels/dos.c (MBR_BOOT_CODE):
> 	* libparted/labels/efi_crc32.c (crc32_tab):
> 	* libparted/labels/pc98.c (MBR_BOOT_CODE):
> 	* libparted/labels/vtoc.c (EBCtoASC, ASCtoEBC):

Ack.

-- 
        O T A V I O    S A L V A D O R
---------------------------------------------
 E-mail: otavio at debian.org      UIN: 5906116
 GNU/Linux User: 239058     GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
---------------------------------------------
"Microsoft sells you Windows ... Linux gives
 you the whole house."



More information about the parted-devel mailing list