Opened 19 years ago

Closed 18 years ago

Last modified 18 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 Changed 19 years ago by anonymous

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 Changed 18 years ago by bird

Resolution: fixed
Status: newclosed

Applied with appropriate (void *) cast.

comment:3 Changed 18 years ago by bird

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