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);
?
> + 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);
Ditto.
> + if (aio)
> + status = NtWriteFile (prw_handle, aiocb->aio_win_event, NULL, NULL,
> + &aiocb->aio_win_iosb, buf, count, &off, NULL);
> + else
> + status = NtWriteFile (prw_handle, NULL, NULL, NULL, &io, buf, count,
> + &off, NULL);
Ditto.
Thanks,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
signature.asc
Description: PGP signature
