IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 8374 for trunk/psLib/src/types


Ignore:
Timestamp:
Aug 15, 2006, 5:28:13 PM (20 years ago)
Author:
drobbin
Message:

removed error check for NULL vector in MetaItemCopy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/types/psMetadata.c

    r8312 r8374  
    1212 *  @author Ross Harman, MHPCC
    1313 *
    14  *  @version $Revision: 1.123 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2006-08-14 20:05:05 $
     14 *  @version $Revision: 1.124 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2006-08-16 03:28:13 $
    1616 *
    1717 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    384384        PS_METADATA_ITEM_COPY_CASE(STRING,V); // This will copy the string, not point at it.
    385385    case PS_DATA_VECTOR: {
     386            PS_ASSERT_PTR_NON_NULL(in->data.V, NULL);
    386387            psVector *vecCopy = psVectorCopy(NULL, (psVector*)(in->data.V),
    387388                                             ((psVector*)(in->data.V))->type.type);
    388             if (vecCopy == NULL) {
    389                 psError(PS_ERR_BAD_PARAMETER_NULL, false,
    390                         "Error copying vector.  Vector skipped.\n");
    391             } else {
    392                 newItem = psMetadataItemAlloc(in->name, PS_DATA_VECTOR, in->comment, vecCopy);
    393                 psFree(vecCopy);    // Drop reference
    394             }
     389            //Following condition was removed b/c it doesn't seem possible for a
     390            //non-NULL vector to be returned for non-NULL input
     391            //            if (vecCopy == NULL) {
     392            //                psError(PS_ERR_BAD_PARAMETER_NULL, false,
     393            //                        "Error copying vector.  Vector skipped.\n");
     394            //            } else {
     395            newItem = psMetadataItemAlloc(in->name, PS_DATA_VECTOR, in->comment, vecCopy);
     396            psFree(vecCopy);    // Drop reference
     397            //            }
    395398            break;
    396399        }
     
    455458            psErrorStackPrint(stderr, "Error copying %s (%s) in the metadata\n", inItem->name,
    456459                              inItem->comment);
     460            printf("\nok we're here\n");
    457461        }
    458462        psFree(newItem);                // Drop reference
Note: See TracChangeset for help on using the changeset viewer.