mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Convert into '?:' expression.
This commit is contained in:
@@ -237,10 +237,9 @@ public partial class Device
|
||||
|
||||
Error = LastError != 0;
|
||||
|
||||
if(transferLength > 1)
|
||||
AaruConsole.DebugWriteLine("MMC Device", "READ_MULTIPLE_BLOCK took {0} ms.", duration);
|
||||
else
|
||||
AaruConsole.DebugWriteLine("MMC Device", "READ_SINGLE_BLOCK took {0} ms.", duration);
|
||||
AaruConsole.DebugWriteLine("MMC Device",
|
||||
transferLength > 1 ? "READ_MULTIPLE_BLOCK took {0} ms."
|
||||
: "READ_SINGLE_BLOCK took {0} ms.", duration);
|
||||
|
||||
return sense;
|
||||
}
|
||||
|
||||
@@ -70,10 +70,7 @@ public partial class Device
|
||||
cdb[3] = (byte)(lba & 0xFF);
|
||||
cdb[4] = transferLength;
|
||||
|
||||
if(transferLength == 0)
|
||||
buffer = new byte[256 * blockSize];
|
||||
else
|
||||
buffer = new byte[transferLength * blockSize];
|
||||
buffer = transferLength == 0 ? new byte[256 * blockSize] : new byte[transferLength * blockSize];
|
||||
|
||||
LastError = SendScsiCommand(cdb, ref buffer, out senseBuffer, timeout, ScsiDirection.In, out duration,
|
||||
out bool sense);
|
||||
|
||||
Reference in New Issue
Block a user