OSSP CVS Repository

ossp - Check-in [2704]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 2704
Date: 2002-Oct-31 08:20:10 (local)
2002-Oct-31 07:20:10 (UTC)
User:rse
Branch:
Comment: Consistently return SA_ERR_MEM instead of SA_ERR_SYS if memory allocations failed.
Tickets:
Inspections:
Files:
ossp-pkg/sa/ChangeLog      1.8 -> 1.9     4 inserted, 0 deleted
ossp-pkg/sa/sa.c      1.66 -> 1.67     3 inserted, 3 deleted

ossp-pkg/sa/ChangeLog 1.8 -> 1.9

--- ChangeLog    2002/10/31 07:17:46     1.8
+++ ChangeLog    2002/10/31 07:20:10     1.9
@@ -12,6 +12,10 @@
   For a more brief summary please have a look at the NEWS file.
 
   Changes between 0.9.3 and 1.0.0 (30-Oct-2002 to 31-Oct-2002)
+   
+   o Consistently return SA_ERR_MEM instead of SA_ERR_SYS
+     if memory allocations failed.
+     [Ralf S. Engelschall]
 
    o Various source tree cleanups.
      [Ralf S. Engelschall]


ossp-pkg/sa/sa.c 1.66 -> 1.67

--- sa.c 2002/10/30 20:22:06     1.66
+++ sa.c 2002/10/31 07:20:10     1.67
@@ -1213,7 +1213,7 @@
             else
                 cp = (char *)realloc(sa->cpReadBuf, size);
             if (cp == NULL)
-                return SA_RC(SA_ERR_SYS);
+                return SA_RC(SA_ERR_MEM);
             sa->cpReadBuf = cp;
             sa->nReadSize = size;
         }
@@ -1234,7 +1234,7 @@
             else
                 cp = (char *)realloc(sa->cpWriteBuf, size);
             if (cp == NULL)
-                return SA_RC(SA_ERR_SYS);
+                return SA_RC(SA_ERR_MEM);
             sa->cpWriteBuf = cp;
             sa->nWriteSize = size;
         }
@@ -2203,7 +2203,7 @@
     if ((nBuf+1) > sizeof(caBuf)) {
         /* requires a larger buffer, so allocate dynamically */
         if ((cpBuf = (char *)malloc(nBuf+1)) == NULL)
-            return SA_RC(SA_ERR_SYS);
+            return SA_RC(SA_ERR_MEM);
     }
     else {
         /* fits into small buffer, so allocate statically */

CVSTrac 2.0.1