Jim Zelenka <[EMAIL PROTECTED]> writes:
>   if (do_async) {
>     ret = read_data(req->fd, req->buffer, req->buffer_len,
>       read__complete, req, &read_results);
[...]
>   else {
>     ret = read_data(req->fd, req->buffer, req->buffer_len,
>       NULL, NULL, &read_results);

I think you'll find another problem with trying to annotate this
properly: If I understand your example properly, it probably *is* okay
to pass the address of an automatic if you're passing NULL for the
callback function and data.  (I assume that's the flag to indicate to
read_data whether or not to wait for the result?)  So a proper
annotation for read_data should indicate that it needs to keep the
results area *if* the callback pointers are non-NULL, and it does not
if they are NULL.

You may find it easier to create two functions and annotate them
differently (even if they both call the same underlying function).

Ken

Reply via email to