From e39ca690efb0ceba3fba3f9a27c898fe61b43801 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 27 Jul 2008 23:16:27 +0200 Subject: add a few assert()s --- libasyncns/asyncns.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libasyncns/asyncns.c b/libasyncns/asyncns.c index be2b2c1..3917bae 100644 --- a/libasyncns/asyncns.c +++ b/libasyncns/asyncns.c @@ -199,6 +199,8 @@ static int close_allv(const int except_fds[]) { DIR *d; + assert(except_fds); + if ((d = opendir("/proc/self/fd"))) { struct dirent *de; @@ -281,6 +283,7 @@ static int close_allv(const int except_fds[]) { static int reset_sigsv(const int except[]) { int sig; + assert(except); for (sig = 1; sig < _NSIG; sig++) { int reset = 1; @@ -322,6 +325,7 @@ static int reset_sigsv(const int except[]) { static int ignore_sigsv(const int ignore[]) { int i; + assert(ignore); for (i = 0; ignore[i] > 0; i++) { struct sigaction sa; -- cgit