scsi: fix incorrect ?: use
Fixes OpenBSD build. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
d08d6f04d6
commit
407f879abb
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user