Changeset 9143 for trunk/psLib/src/types
- Timestamp:
- Oct 2, 2006, 8:51:47 PM (20 years ago)
- Location:
- trunk/psLib/src/types
- Files:
-
- 2 edited
-
psList.c (modified) (3 diffs)
-
psLookupTable.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/types/psList.c
r9086 r9143 6 6 * @author Robert Daniel DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1.5 3$ $Name: not supported by cvs2svn $9 * @date $Date: 2006-10-0 2 06:05:53$8 * @version $Revision: 1.54 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2006-10-03 06:51:47 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 574 574 } 575 575 576 if (list->n > 0) { 577 arr = psArrayAlloc(list->n); 578 } else { 579 arr = psArrayAlloc(1); 580 } 581 576 //XXX: Following is unnecessary as a list->n = 0 should do ArrayAlloc(0) I believe. 577 /* if (list->n > 0) { 578 arr = psArrayAlloc(list->n); 579 } else { 580 arr = psArrayAlloc(1); 581 } 582 */ 583 arr = psArrayAlloc(list->n); 582 584 arr->n = list->n; 583 585 … … 618 620 return NULL; 619 621 } 622 if (func == NULL) { 623 psError(PS_ERR_BAD_PARAMETER_NULL, true, 624 _("Specified psComparePtrFunc is NULL.")); 625 return list; 626 } 620 627 // convert to indexable vector for use by qsort. 621 628 arr = psListToArray(list); -
trunk/psLib/src/types/psLookupTable.c
r8627 r9143 7 7 * @author Ross Harman, MHPCC 8 8 * 9 * @version $Revision: 1.3 7$ $Name: not supported by cvs2svn $10 * @date $Date: 2006- 08-26 04:34:28$9 * @version $Revision: 1.38 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2006-10-03 06:51:47 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii … … 253 253 static void lookupTableFree(psLookupTable* table) 254 254 { 255 if (table == NULL) {256 return;257 }258 259 255 psFree(table->values); 260 256 psFree(table->filename); … … 279 275 long indexCol) 280 276 { 281 psLookupTable *outTable = NULL;282 283 277 // Can't read table if you don't know its name 284 278 PS_ASSERT_PTR_NON_NULL(filename,NULL); … … 286 280 // Can't read table if you don't know its format 287 281 PS_ASSERT_PTR_NON_NULL(format,NULL); 282 283 psLookupTable *outTable = NULL; 288 284 289 285 // Allocate lookup table
Note:
See TracChangeset
for help on using the changeset viewer.
