#309599 res_search(3): return value of res_search and friends are poorly documented

#309599#5
Date:
2005-05-18 09:09:01 UTC
From:
To:
Please document that the res_search function return the *actual* length
of the response, which may be greater than the length of the supplied
buffer.

#309599#10
Date:
2005-12-13 17:38:01 UTC
From:
To:
tag 309599 moreinfo
thanks

Does this bug still apply?  The relevant section says:

       The res_query(),  res_search(),  res_querydomain(),
       res_mkquery()  and res_send()  functions  return  the  length
       of the response, or -1 if an error occurs.

Which seems accurate to me.

#309599#15
Date:
2005-12-13 18:08:19 UTC
From:
To:
* Justin Pryzby:

It is ambiguous.  Does "length of the response" refer to the number of
bytes actually written, or the number of bytes received?

#309599#24
Date:
2013-03-07 11:09:49 UTC
From:
To:
Florian,

Can you provide some supporting eveidence for this patch -- (simple)
test code or a specific references in the glibs source?

Cheers,

Michael