On Jul 15 01:20, Mark Geisert wrote:
+ if (aio)
+ status = NtReadFile (prw_handle, aiocb->aio_win_event, NULL, NULL,
+ &aiocb->aio_win_iosb, buf, count, &off, NULL);
+ else
+ status = NtReadFile (prw_handle, NULL, NULL, NULL, &io, buf, count,
+ &off, NULL);
Ok, this is a very personal style issue, but I don't like to see the same
function called just with slightly different parameters in an if/else.
Would you mind terribly to rewrite this kind of like
HANDLE evt = aio ? aiocb->aio_win_event : NULL;
PIO_STATUS_BLOCK pio = aio ? &aiocb->aio_win_iosb : NULL;
[...]
status = NtReadFile (prw_handle, evt, NULL, NULL, pio, buf, count,
&off, NULL);
?