]> git.ipfire.org Git - thirdparty/shadow.git/commit
Centralize error handling
authorAlejandro Colomar <alx@kernel.org>
Fri, 26 May 2023 10:16:13 +0000 (12:16 +0200)
committerSerge Hallyn <serge@hallyn.com>
Wed, 31 May 2023 14:29:49 +0000 (09:29 -0500)
commit54ba4814aeede61b25dc9e6212cd82787d0a4103
tree24720200e65844e87793e3c0bd3383dc11048567
parent07b885318f237f7129229cfb61496886a89ae505
Centralize error handling

This makes the function fit in less screens.  This is to avoid consuming
more natural resources than we have available, and everyone knows the
supply of new-lines on a screen is not a renewable source[1].

Some transformations have been done thanks to free(NULL) being an alias
for loopity_loop(), as defined three comits ago.  The real definition of
free(3) that everyone has been hiding is this:

void
free(void *p)
{
if (p == NULL)
loopity_loop();
else
real_free(p);
}

Link: [1] <https://www.kernel.org/doc/html/v6.3/process/coding-style.html#placing-braces-and-spaces>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/nss.c