Changeset 8694 for trunk/psLib/src/types
- Timestamp:
- Aug 29, 2006, 2:54:51 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/types/psMetadata.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/types/psMetadata.c
r8668 r8694 12 12 * @author Ross Harman, MHPCC 13 13 * 14 * @version $Revision: 1.13 0$ $Name: not supported by cvs2svn $15 * @date $Date: 2006-08- 29 20:23:54$14 * @version $Revision: 1.131 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2006-08-30 00:54:51 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 376 376 psVector *vecCopy = psVectorCopy(NULL, (psVector*)(in->data.V), 377 377 ((psVector*)(in->data.V))->type.type); 378 //Following condition was removed b/c it doesn't seem possible for a379 //non-NULL vector to be returned for non-NULL input380 // if (vecCopy == NULL) {381 // psError(PS_ERR_BAD_PARAMETER_NULL, false,382 // "Error copying vector. Vector skipped.\n");383 // } else {384 378 newItem = psMetadataItemAlloc(in->name, PS_DATA_VECTOR, in->comment, vecCopy); 385 379 psFree(vecCopy); // Drop reference 386 // }387 380 break; 388 381 } … … 425 418 const psMetadata *in) 426 419 { 427 PS_ASSERT_PTR_NON_NULL(in,NULL); 428 PS_ASSERT_PTR_NON_NULL(in->list,NULL); 420 // PS_ASSERT_PTR_NON_NULL(in,NULL); 421 if (in == NULL) { 422 if (out != NULL) { 423 psFree(out); 424 out = NULL; 425 } 426 return out; 427 } 428 // PS_ASSERT_PTR_NON_NULL(in->list,NULL); 429 if (in->list == NULL) { 430 if (out != NULL) { 431 psFree(out); 432 out = NULL; 433 } 434 return out; 435 } 436 429 437 if (out == NULL) { 430 438 out = psMetadataAlloc(); … … 447 455 psErrorStackPrint(stderr, "Error copying %s (%s) in the metadata\n", inItem->name, 448 456 inItem->comment); 457 psFree(newItem); 458 psFree(iter); 459 psFree(out); 460 out = NULL; 461 return out; 449 462 } 450 463 psFree(newItem); // Drop reference
Note:
See TracChangeset
for help on using the changeset viewer.
