]> err.no Git - linux-2.6/commitdiff
[IA64] fix number of bytes zeroed by sys_fw_init() in arch/ia64/hp/sim/boot/fw-emu.c
authorRoel Kluin <12o3l@tiscali.nl>
Tue, 6 Nov 2007 21:13:53 +0000 (22:13 +0100)
committerTony Luck <tony.luck@intel.com>
Tue, 6 Nov 2007 21:27:18 +0000 (13:27 -0800)
The sizeof a pointer is constant, we want the sizeof what is pointed to.
Zero out 'sizeof(*efi_systab)' bytes of the efi_system_table_t pointer
'efi_systab' instead.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/hp/sim/boot/fw-emu.c

index 1189d035d316e6f853e464b5736d81eafe72f937..bf6d9d8c802fdb9d20e087e28c05a0501f8d9896 100644 (file)
@@ -285,7 +285,7 @@ sys_fw_init (const char *args, int arglen)
        }
        cmd_line[arglen] = '\0';
 
-       memset(efi_systab, 0, sizeof(efi_systab));
+       memset(efi_systab, 0, sizeof(*efi_systab));
        efi_systab->hdr.signature = EFI_SYSTEM_TABLE_SIGNATURE;
        efi_systab->hdr.revision  = ((1 << 16) | 00);
        efi_systab->hdr.headersize = sizeof(efi_systab->hdr);