Changeset 947 for trunk/psLib/src/collections/psList.c
- Timestamp:
- Jun 9, 2004, 9:50:32 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/collections/psList.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/collections/psList.c
r942 r947 6 6 * @author Robert Daniel DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $9 * @date $Date: 2004-06-09 02:16:41$8 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2004-06-09 19:50:32 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 33 33 34 34 35 36 static psListElem *listElemAlloc(void)37 {38 return(psAlloc(sizeof(psListElem)));39 }40 41 static void listElemFree(psListElem *elem)42 {43 psFree(elem);44 }45 46 35 psList *psListAlloc(void *data) 47 36 { … … 75 64 76 65 p_psCustomFree(elemFree, psMemDecrRefCounter(ptr->data)); 77 listElemFree(ptr);66 psFree(ptr); 78 67 79 68 ptr = next; … … 92 81 { 93 82 psListElem* position; 94 psListElem* elem = listElemAlloc();83 psListElem* elem; 95 84 int cursorIndex = 0; 96 85 … … 102 91 return list; 103 92 } 93 elem = psAlloc(sizeof(psListElem)); 104 94 105 95 pthread_mutex_lock(&list->lock) … … 257 247 */ 258 248 data = elem->data; 259 listElemFree(elem);249 psFree(elem); 260 250 return data; 261 251 }
Note:
See TracChangeset
for help on using the changeset viewer.
