Opened 19 years ago

Closed 19 years ago

Last modified 19 years ago

#4 closed defect (fixed)

shmat wrong return code

Reported by: Yuri Dario Owned by: bird
Priority: normal Milestone: libc-0.6
Component: libc Version:
Severity: normal Keywords:
Cc:

Description

shmat returns 0 instead of -1 for errors:

Index: lib/process/shmat.c =================================================================== RCS file: /netlabs.cvs/libc/src/emx/src/lib/process/shmat.c,v retrieving revision 1.1.1.2 diff -u -r1.1.1.2 shmat.c --- lib/process/shmat.c 2005/07/18 19:51:22 1.1.1.2 +++ lib/process/shmat.c 2005/10/24 14:56:24 @@ -49,6 +49,6 @@

if (rc >= 0)

LIBCLOG_RETURN_P(pvActual);

errno = -rc;

  • LIBCLOG_ERROR_RETURN_P(NULL);

+ LIBCLOG_ERROR_RETURN_P(-1);

}

Change History (3)

comment:1 by anonymous, 19 years ago

Index: lib/process/shmat.c
===================================================================
RCS file: /netlabs.cvs/libc/src/emx/src/lib/process/shmat.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 shmat.c
--- lib/process/shmat.c	2005/07/18 19:51:22	1.1.1.2
+++ lib/process/shmat.c	2005/10/24 14:56:24
@@ -49,6 +49,6 @@
     if (rc >= 0)
         LIBCLOG_RETURN_P(pvActual);
     errno = -rc;
-    LIBCLOG_ERROR_RETURN_P(NULL);
+    LIBCLOG_ERROR_RETURN_P(-1);
 }
 

comment:2 by bird, 19 years ago

Resolution: fixed
Status: newclosed

Applied with appropriate (void *) cast.

comment:3 by bird, 19 years ago

Milestone: libc-0.6
Note: See TracTickets for help on using tickets.