diff options
Diffstat (limited to 'hw')
-rw-r--r-- | hw/block-common.c | 2 | ||||
-rw-r--r-- | hw/ide/core.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/hw/block-common.c b/hw/block-common.c index 036334b1ec..0a0542a650 100644 --- a/hw/block-common.c +++ b/hw/block-common.c @@ -17,7 +17,7 @@ void blkconf_serial(BlockConf *conf, char **serial) if (!*serial) { /* try to fall back to value set with legacy -drive serial=... */ dinfo = drive_get_by_blockdev(conf->bs); - if (*dinfo->serial) { + if (dinfo->serial) { *serial = g_strdup(dinfo->serial); } } diff --git a/hw/ide/core.c b/hw/ide/core.c index 58a454fde5..5378fc39fe 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -2095,9 +2095,9 @@ void ide_init2_with_non_qdev_drives(IDEBus *bus, DriveInfo *hd0, trans = hd_bios_chs_auto_trans(cyls, heads, secs); } if (ide_init_drive(&bus->ifs[i], dinfo->bdrv, - dinfo->media_cd ? IDE_CD : IDE_HD, NULL, - *dinfo->serial ? dinfo->serial : NULL, - NULL, 0, cyls, heads, secs, trans) < 0) { + dinfo->media_cd ? IDE_CD : IDE_HD, + NULL, dinfo->serial, NULL, 0, + cyls, heads, secs, trans) < 0) { error_report("Can't set up IDE drive %s", dinfo->id); exit(1); } |