Changeset 1295 for trunk/psLib/test/sysUtils/tst_psHash03.c
- Timestamp:
- Jul 23, 2004, 5:31:22 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/sysUtils/tst_psHash03.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/sysUtils/tst_psHash03.c
r1201 r1295 68 68 int i = 0; 69 69 int TotalKeys = 0; 70 bool retVal = false; 70 71 ID *id = NULL; 71 72 char *myKeys[] = {"ENTRY00", "ENTRY01", "ENTRY02", "ENTRY03", NULL}; … … 101 102 i = 0; 102 103 while (myKeys[i] != NULL) { 103 id = psHashRemove(myHashTable, myKeys[i]);104 104 // The psHashRemove() procedure removes the entry from the hash 105 // table, but does not delete the data. The following is necessary 106 // to delete the data as well (which is returned from the call). 107 psFree(id); 105 // table and deletes the data. 106 retVal = psHashRemove(myHashTable, myKeys[i]); 107 if (!retVal) { 108 fprintf(stderr,"%s: Hash table entry not removed.\n",__func__); 109 } 108 110 id = psHashLookup(myHashTable, myKeys[i]); 109 111 if (id != NULL) { … … 124 126 psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks); 125 127 } 126 psMemCheckCorruption( 1);128 psMemCheckCorruption(true); 127 129 128 130 return (!testStatus); 129 131 } 132
Note:
See TracChangeset
for help on using the changeset viewer.
