The -1 error return of shmat() should be cast "(void *)".

This commit is contained in:
Michael Kerrisk 2005-12-02 08:09:44 +00:00
parent c1164764b0
commit eeabb34e30
1 changed files with 10 additions and 5 deletions

View File

@ -175,12 +175,17 @@ all attached shared memory segments are detached from the process.
.SH "RETURN VALUE"
On success
.BR shmat ()
returns the address of the attached shared memory segment, and
.BR shmdt ()
returns 0.
On failure both functions return \-1 with
returns the address of the attached shared memory segment; on error
.I (void *) \-1
is returned, and
.I errno
indicating the error.
is set to indicate the cause of the error.
On success
.BR shmdt ()
returns 0; on error \-1 is returned, and
.I errno
is set to indicate the cause of the error.
.SH ERRORS
When
.BR shmat ()