On 07/26/2016 12:44 PM, Sascha Silbe wrote: > As a general policy, we want callers to save errno > themselves. error_setg_internal() currently goes out of its way to > preserve errno, so with the API documentation not mentioning it either > way, callers might come to rely on the current behaviour of the > implementation. Spell out that we don't want to make that promise.
Alternatively, we could explicitly document that we DO intend to preserve errno, so that callers can rely on it. Libvirt went with that approach (error-reporting functions that preserve errno are easier to think about than functions which may clobber errno). -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
