Index: trunk/psLib/src/sys/psErrorCodes.c
===================================================================
--- trunk/psLib/src/sys/psErrorCodes.c	(revision 2273)
+++ trunk/psLib/src/sys/psErrorCodes.c	(revision 2681)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-11-04 01:05:00 $
+ *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-12-10 02:50:15 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -76,10 +76,9 @@
 
         // search dynamic list of error descriptions before giving up.
-        desc = (psErrorDescription*)psListGet(dynamicErrorCodes,PS_LIST_HEAD);
-        while (desc != NULL) {
+        psListIterator* iter = psListIteratorAlloc(dynamicErrorCodes,PS_LIST_HEAD);
+        while ((desc = (psErrorDescription*)psListGetNext(iter)) != NULL) {
             if (desc->code == code) {
                 return desc;
             }
-            desc = (psErrorDescription*)psListGetNext(dynamicErrorCodes);
         }
     }
@@ -178,4 +177,4 @@
     }
 
-    return psListRemove(dynamicErrorCodes,PS_LIST_UNKNOWN,(psPtr)desc);
+    return psListRemoveData(dynamicErrorCodes,(psPtr)desc);
 }
