Rémi Bernon (@rbernon) commented about server/async.c:
- if (count)
- {
if (count > capacity)
{
set_error( STATUS_BUFFER_OVERFLOW );
reply->handles_size = count * sizeof(*ptr);
return;
}
count = cancel_async( current->process, obj, thread, req->iosb, &canceled_list );
count = min( count, capacity );
i = 0;
if ((ptr = set_reply_data_size( count * sizeof(*ptr) )))
{
LIST_FOR_EACH_ENTRY_SAFE( async, next_async, &canceled_list, struct async, canceled_entry )
{
if (i++ < capacity)
Same thing, this doesn't look necessary as you already check `count > capacity` above.