Laszlo Ersek <ler...@redhat.com> writes: > On 08/16/13 13:13, arm...@redhat.com 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 <ler...@redhat.com> Thanks!