scsi: fix incorrect ?: use

Fixes OpenBSD build.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
Blue Swirl 2009-12-04 18:08:59 +00:00
parent d08d6f04d6
commit 407f879abb

View File

@ -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)