Index: /trunk/psLib/src/sysUtils/psHash.c
===================================================================
--- /trunk/psLib/src/sysUtils/psHash.c	(revision 1294)
+++ /trunk/psLib/src/sysUtils/psHash.c	(revision 1295)
@@ -10,6 +10,6 @@
  *  @author George Gusciora, MHPCC
  *   
- *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-07-08 22:05:14 $
+ *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-07-24 03:31:06 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -357,5 +357,5 @@
     itemFree: a function pointer
 Return:
-    NONE
+    boolean value defining success or failure 
  *****************************************************************************/
 bool psHashAdd(psHash *table, const char *key, void *data)
@@ -407,8 +407,11 @@
     itemFree: a function pointer
 Return:
-    The data that was associated with that key.
- *****************************************************************************/
-void *psHashRemove(psHash *table, const char *key)
-{
+    boolean value defining success or failure
+ *****************************************************************************/
+bool psHashRemove(psHash *table, const char *key)
+{
+    void *data = NULL;
+    bool retVal = false;
+
     if (table == NULL) {
         psAbort(__func__, "psHashRemove() called with NULL hash table.");
@@ -418,4 +421,11 @@
     }
 
-    return doHashWork(table, key, NULL, 1);
-}
+    data = doHashWork(table, key, NULL, 1);
+    if ( data != NULL) {
+        psFree(data);
+        retVal = true;
+    } else {
+        retVal = false;
+    }
+    return retVal;
+}
Index: /trunk/psLib/test/sysUtils/tst_psHash03.c
===================================================================
--- /trunk/psLib/test/sysUtils/tst_psHash03.c	(revision 1294)
+++ /trunk/psLib/test/sysUtils/tst_psHash03.c	(revision 1295)
@@ -68,4 +68,5 @@
     int i               = 0;
     int TotalKeys       = 0;
+    bool retVal         = false;
     ID *id = NULL;
     char *myKeys[] = {"ENTRY00", "ENTRY01", "ENTRY02", "ENTRY03", NULL};
@@ -101,9 +102,10 @@
     i = 0;
     while (myKeys[i] != NULL) {
-        id = psHashRemove(myHashTable, myKeys[i]);
         // The psHashRemove() procedure removes the entry from the hash
-        // table, but does not delete the data.  The following is necessary
-        // to delete the data as well (which is returned from the call).
-        psFree(id);
+        // table and deletes the data.
+        retVal = psHashRemove(myHashTable, myKeys[i]);
+        if (!retVal) {
+            fprintf(stderr,"%s: Hash table entry not removed.\n",__func__);
+        }
         id = psHashLookup(myHashTable, myKeys[i]);
         if (id != NULL) {
@@ -124,6 +126,7 @@
         psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
     }
-    psMemCheckCorruption(1);
+    psMemCheckCorruption(true);
 
     return (!testStatus);
 }
+
