aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi-disk.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/scsi-disk.c')
-rw-r--r--hw/scsi-disk.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c
index 642d7919ba..2e7a57b2db 100644
--- a/hw/scsi-disk.c
+++ b/hw/scsi-disk.c
@@ -346,7 +346,8 @@ static int scsi_disk_emulate_inquiry(SCSIRequest *req, uint8_t *outbuf)
case 0x80: /* Device serial number, optional */
{
- const char *serial = req->dev->dinfo->serial ?: "0";
+ const char *serial = req->dev->dinfo->serial ?
+ req->dev->dinfo->serial : "0";
int l = strlen(serial);
if (l > req->cmd.xfer)