tree-wide: use assert_se() for signal operations with constants
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 21 Dec 2018 08:20:15 +0000 (09:20 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 21 Dec 2018 18:49:28 +0000 (19:49 +0100)
commitcd2a429ed77fd5a94bc725ee587e028ee2e045dd
tree1e19eaa83df8da73d41fe0060f86422ba9b02812
parent9d6e839ed8b2fb5e611864f6ed5d278c5222c270
tree-wide: use assert_se() for signal operations with constants

Continuation of a3ebe5eb620e49f0d24082876cafc7579261e64f:
in other places we sometimes use assert_se(), and sometimes normal error
handling. sigfillset and sigaddset can only fail if mask is NULL (which cannot
happen if we are passing in a reference), or if the signal number is invalid
(which really shouldn't happen when we are using a constant like SIGCHLD. If
SIGCHLD is invalid, we have a bigger problem). So let's simplify things and
always use assert_se() in those cases.

In sigset_add_many() we could conceivably pass an invalid signal, so let's keep
normal error handling here. The caller can do assert_se() around the
sigprocmask_many() call if appropriate.

'>= 0' is used for consistency with the rest of the codebase.
src/basic/async.c
src/basic/process-util.c
src/journal/journal-file.c
src/libsystemd/sd-resolve/sd-resolve.c