Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#4 closed defect (fixed)

shmat wrong return code

Reported by: ydario 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 13 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 13 years ago by bird

  • Resolution set to fixed
  • Status changed from new to closed

Applied with appropriate (void *) cast.

comment:3 Changed 13 years ago by bird

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