Dear Markus, Markus Armbruster <[email protected]> writes:
> Sascha Silbe <[email protected]> writes: > >> As a general policy, we want callers to save errno >> themselves. error_setg_internal() currently goes out of its way to >> preserve errno, > > In other words, "error_setg_errno(): errno may be clobbered" is a lie :) No, it's just standardese (though it should be in capital letters for that) for "do not rely on it, we may change our mind any time". :) >> so with the API documentation not mentioning it either >> way, callers might come to rely on the current behaviour of the >> implementation. > > According to Max, we rely on the errno-saving behavior in several places > already, and don't intend to change them. > >> Spell out that we don't want to make that promise. > > Well, we already did, tacitly. Let's make the promise explicit. Could > you post the patch? Sure [1]. Like a good lawyer, I can argue either way, even within the same case. ;) Sascha [1] mid:[email protected] "[PATCH] error: error_setg_errno(): errno gets preserved" by Sascha Silbe <[email protected]>, sent on 2016-07-27. -- Softwareentwicklung Sascha Silbe, Niederhofenstraße 5/1, 71229 Leonberg https://se-silbe.de/ USt-IdNr. DE281696641
