Revision 0d913fdb hw/ppc_prep.c

b/hw/ppc_prep.c
529 529
                           const char *initrd_filename,
530 530
                           const char *cpu_model)
531 531
{
532
    CPUState *env, *envs[MAX_CPUS];
532
    CPUState *env = NULL, *envs[MAX_CPUS];
533 533
    char buf[1024];
534 534
    nvram_t nvram;
535 535
    m48t59_t *m48t59;
......
614 614
        initrd_size = 0;
615 615
        ppc_boot_device = '\0';
616 616
        /* For now, OHW cannot boot from the network. */
617
        for (i = 0; i < boot_device[i] != '\0'; i++) {
618
            ppc_boot_device = boot_device[i];
619
            if (ppc_boot_device >= 'a' && ppc_boot_device <= 'f')
617
        for (i = 0; boot_device[i] != '\0'; i++) {
618
            if (boot_device[i] >= 'a' && boot_device[i] <= 'f') {
619
                ppc_boot_device = boot_device[i];
620 620
                break;
621
            }
621 622
        }
622 623
        if (ppc_boot_device == '\0') {
623 624
            fprintf(stderr, "No valid boot device for Mac99 machine\n");

Also available in: Unified diff