diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-11-27 22:48:46 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-11-28 09:25:38 +0100 |
commit | b0fe73d740e5f813fada54d66c73532514bf0ea6 (patch) | |
tree | cf025666950e7f8b606e6fd0d9cb27a90ab5cec3 /src/udev/udevadm-monitor.c | |
parent | core/umount: use _cleanup_ in one more place (diff) | |
download | systemd-b0fe73d740e5f813fada54d66c73532514bf0ea6.tar.xz systemd-b0fe73d740e5f813fada54d66c73532514bf0ea6.zip |
udevadm-monitor: add some assert_se's to make coverity happy
We do that elsewhere and it's nice to be consistent.
Diffstat (limited to 'src/udev/udevadm-monitor.c')
-rw-r--r-- | src/udev/udevadm-monitor.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/udev/udevadm-monitor.c b/src/udev/udevadm-monitor.c index a369dc2ac2..c8b85fb0f4 100644 --- a/src/udev/udevadm-monitor.c +++ b/src/udev/udevadm-monitor.c @@ -145,12 +145,12 @@ static int adm_monitor(struct udev *udev, int argc, char *argv[]) { /* set signal handlers */ act.sa_handler = sig_handler; act.sa_flags = SA_RESTART; - sigaction(SIGINT, &act, NULL); - sigaction(SIGTERM, &act, NULL); - sigemptyset(&mask); - sigaddset(&mask, SIGINT); - sigaddset(&mask, SIGTERM); - sigprocmask(SIG_UNBLOCK, &mask, NULL); + assert_se(sigaction(SIGINT, &act, NULL) == 0); + assert_se(sigaction(SIGTERM, &act, NULL) == 0); + assert_se(sigemptyset(&mask) == 0); + assert_se(sigaddset(&mask, SIGINT) == 0); + assert_se(sigaddset(&mask, SIGTERM) == 0); + assert_se(sigprocmask(SIG_UNBLOCK, &mask, NULL) == 0); /* Callers are expecting to see events as they happen: Line buffering */ setlinebuf(stdout); |