Loading...
gen/sigsetops.c Libc-583 Libc-262.2.12
--- Libc/Libc-583/gen/sigsetops.c
+++ Libc/Libc-262.2.12/gen/sigsetops.c
@@ -2,6 +2,8 @@
  * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
+ * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
  * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
@@ -63,7 +65,6 @@
 #undef sigdelset
 #undef sigismember
 
-int
 sigemptyset(set)
 	sigset_t *set;
 {
@@ -71,7 +72,6 @@
 	return (0);
 }
 
-int
 sigfillset(set)
 	sigset_t *set;
 {
@@ -79,7 +79,6 @@
 	return (0);
 }
 
-int
 sigaddset(set, signo)
 	sigset_t *set;
 	int signo;
@@ -88,13 +87,10 @@
 		errno = EINVAL;
 		return(-1);
 	}
-	if (signo == 0)
-		return(0);
 	*set |= sigmask(signo);
 	return (0);
 }
 
-int
 sigdelset(set, signo)
 	sigset_t *set;
 	int signo;
@@ -103,13 +99,10 @@
 		errno = EINVAL;
 		return(-1);
 	}
-	if (signo == 0)
-		return(0);
 	*set &= ~sigmask(signo);
 	return (0);
 }
 
-int
 sigismember(set, signo)
 	const sigset_t *set;
 	int signo;
@@ -118,7 +111,5 @@
 		errno = EINVAL;
 		return(-1);
 	}
-	if (signo == 0)
-		return(0);
-	return ((*set & sigmask(signo)) != 0);
+	return ((*set & ~sigmask(signo)) != 0);
 }