]>
git.ipfire.org Git - thirdparty/shadow.git/commit
lib/string/: strerrno(): Use statement expression to perform lvalue conversion
Compound literals are lvalues. This means it's possible to take their
address. That is, it would be possible (albeit nonsensical) to do
&strerrno();
It is also possible to assign to them (albeit also nonsensical):
strerrno() = NULL;
The statement expression performs lvalue conversion, which turns the
lvalue into an "rvalue", as expected, and disallows all those issues.
Signed-off-by: Alejandro Colomar <alx@kernel.org>