]> git.ipfire.org Git - thirdparty/systemd.git/commit
resolved: rework a few functions to return early on error
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 8 May 2019 08:55:39 +0000 (10:55 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 10 Feb 2021 13:47:00 +0000 (14:47 +0100)
commit419076978c140c86cea02ce41cfec95abba68090
treebb30ac93557f03ce71bcd0c65231714dab1e11c1
parentc706a52ac5f6b6e3d20d0a9e965b557dddbe0401
resolved: rework a few functions to return early on error

The implementation is a bit ugly because we set the output variable
twice. But we were already doing this on error, so this is not
significantly worse. Doing this allows us to avoid goto's, and the
compiler should be able to figure this out and only set once.
src/resolve/resolved-link.c