summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2009-12-04 18:08:59 +0000
committerBlue Swirl <blauwirbel@gmail.com>2009-12-04 18:08:59 +0000
commit407f879abb7b3c9ad091f6dabb673dad06e549e8 (patch)
tree076d528483feae9035aa2d286a9c10478c811bc3 /hw
parentd08d6f04d6eeedce5090ff66d0676162d7d8d788 (diff)
scsi: fix incorrect ?: use
Fixes OpenBSD build. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw')
-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)