sd-resolve: tweak error assignment code a bit, use abs() and regular functions
authorLennart Poettering <lennart@poettering.net>
Fri, 18 May 2018 18:35:01 +0000 (20:35 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 19 May 2018 13:14:18 +0000 (15:14 +0200)
commit4aab839c90e4f390956cb777237c1acb115ebeae
treee7b1b7622549180ffb3c10992e220de2fa36926a
parenta7a7163df7fc8a9f794f6803b2f6c9c9b0745a1f
sd-resolve: tweak error assignment code a bit, use abs() and regular functions

Let's tweak the assignment of errors a bit, and automatically abs()
errnos, similar to how log_error_errno() and friends does it.

Macros are fine to use, but regular functions usually preferable if
there's no reason to use macros, because they avoid multiple evaluation
and suchlike. Hence, let's just use a regular funciton for assigning
errors, instead of macros.

Follow-up for #8993
src/libsystemd/sd-resolve/sd-resolve.c