summaryrefslogtreecommitdiffstats
path: root/c/src/exec
diff options
context:
space:
mode:
authorJennifer Averett <Jennifer.Averett@OARcorp.com>1999-11-18 19:55:28 +0000
committerJennifer Averett <Jennifer.Averett@OARcorp.com>1999-11-18 19:55:28 +0000
commitc38f5f162fc185bfe0ee547d0dd16ad231e0130a (patch)
tree47163a6bfeac810fd76815883ea99155b6780347 /c/src/exec
parent8c5cc6b2504cb2b750e9acf8c1ba9b38302800ce (diff)
downloadrtems-c38f5f162fc185bfe0ee547d0dd16ad231e0130a.tar.bz2
Added EINVAL for passing a NULL pointer in.
Diffstat (limited to 'c/src/exec')
-rw-r--r--c/src/exec/posix/src/seminit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/c/src/exec/posix/src/seminit.c b/c/src/exec/posix/src/seminit.c
index a2cf4ba6b9..e2c34777a1 100644
--- a/c/src/exec/posix/src/seminit.c
+++ b/c/src/exec/posix/src/seminit.c
@@ -30,6 +30,10 @@ int sem_init(
int status;
POSIX_Semaphore_Control *the_semaphore;
+ if ( !*sem )
+ set_errno_and_return_minus_one( EINVAL );
+
+
status = _POSIX_Semaphore_Create_support(
NULL,
pshared,