[LTP] [PATCH 2/3] posix: aio_cancel: 5-1, 6-1, 7-1: initialize aio_reqprio

Cyril Hrubis chrubis@suse.cz
Wed Dec 13 16:10:33 CET 2017


Hi!
> aiocb is allocated via malloc(), which does not clear the memory.
> aio_write() may fail with EINVAL if aio_reqprio is not properly
> initialized.

The manual pages suggests to zero the whole structure before use either
by using calloc() or with memset(), can we do that instead please?

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list