From 2e49111a17701de931b6dee45011d321ea08489d Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 11 Apr 2016 09:07:23 -0600 Subject: [PATCH] Fix an error in a DEBUG assertion --- libc/signal/sig_set.c | 2 +- libc/signal/signal.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/libc/signal/sig_set.c b/libc/signal/sig_set.c index b7fe7c603b..de0b27def3 100644 --- a/libc/signal/sig_set.c +++ b/libc/signal/sig_set.c @@ -115,7 +115,7 @@ CODE void (*sigset(int signo, CODE void (*func)(int signo)))(int signo) sigset_t set; int ret; - DEBUGASSERT(GOOD_SIGNO(signo) && func != NULL); + DEBUGASSERT(GOOD_SIGNO(signo) && func != SIG_ERR); (void)sigemptyset(&set); (void)sigaddset(&set, signo); diff --git a/libc/signal/signal.c b/libc/signal/signal.c index e7df89ce29..5830538297 100644 --- a/libc/signal/signal.c +++ b/libc/signal/signal.c @@ -76,8 +76,7 @@ CODE void (*signal(int signo, CODE void (*func)(int signo)))(int signo) struct sigaction oact; int ret; - DEBUGASSERT(GOOD_SIGNO(signo) && func != NULL); - DEBUGASSERT(func != SIG_ERR && func != SIG_HOLD); + DEBUGASSERT(GOOD_SIGNO(signo) && func != SIG_ERR && func != SIG_HOLD); /* Initialize the sigaction structure */