[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [PATCH v4 1/6] pc: Don't prematurely explode
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [PATCH v4 1/6] pc: Don't prematurely explode QEMUMachineInitArgs |
Date: |
Mon, 19 Aug 2013 11:09:18 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) |
Laszlo Ersek <address@hidden> writes:
> On 08/16/13 13:13, address@hidden wrote:
>
>> static void pc_init_isa(QEMUMachineInitArgs *args)
>> {
>> - ram_addr_t ram_size = args->ram_size;
>> - const char *cpu_model = args->cpu_model;
>> - const char *kernel_filename = args->kernel_filename;
>> - const char *kernel_cmdline = args->kernel_cmdline;
>> - const char *initrd_filename = args->initrd_filename;
>> - const char *boot_device = args->boot_device;
>> has_pci_info = false;
>> - if (cpu_model == NULL)
>> - cpu_model = "486";
>> + if (!args->cpu_model) {
>> + args->cpu_model = "486";
>> + }
>
> This modifies *args.
Precedence:
db4ff6f hw/realview.c: Don't prematurely explode QEMUMachineInitArgs
1b523b5 hw/versatilepb: Don't prematurely explode QEMUMachineInitArgs
> IIUC, args here points to the "args" auto variable in main().
> "args.cpu_model" is initialized from the standalone "cpu_model"
> variable. That one in turn is either NULL, or points to a command line
> argument. Ie. "args.cpu_model" is never expected to be freed, and the
> underlying char array is not expected to be modified. OK.
>
> Reviewed-by: Laszlo Ersek <address@hidden>
Thanks!
- [Qemu-ppc] [PATCH v4 0/6] Clean up bogus default boot order, armbru, 2013/08/16
- [Qemu-ppc] [PATCH v4 4/6] ppc: Don't explode QEMUMachineInitArgs into local variables needlessly, armbru, 2013/08/16
- [Qemu-ppc] [PATCH v4 1/6] pc: Don't prematurely explode QEMUMachineInitArgs, armbru, 2013/08/16
- [Qemu-ppc] [PATCH v4 3/6] sun4: Don't prematurely explode QEMUMachineInitArgs, armbru, 2013/08/16
- [Qemu-ppc] [PATCH v4 2/6] pc: Don't explode QEMUMachineInitArgs into local variables needlessly, armbru, 2013/08/16
- [Qemu-ppc] [PATCH v4 6/6] hw: Clean up bogus default boot order, armbru, 2013/08/16
- [Qemu-ppc] [PATCH v4 5/6] ppc: Don't duplicate QEMUMachineInitArgs in PPCE500Params, armbru, 2013/08/16