IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 8374


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

removed error check for NULL vector in MetaItemCopy

Location:
trunk/psLib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/mathtypes/psVector.c

    r8232 r8374  
    99*  @author Robert DeSonia, MHPCC
    1010*
    11 *  @version $Revision: 1.80 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2006-08-08 23:32:23 $
     11*  @version $Revision: 1.81 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2006-08-16 03:28:13 $
    1313*
    1414*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    329329                    typeStr);
    330330            psFree(output);
    331 
     331            output = NULL;
    332332            break;
    333333        }
  • trunk/psLib/src/pstap.h

    r8234 r8374  
    55return exit_status()
    66
     7       #define mem() ok(psMemCheckLeaks(0, NULL, stdout, false) == 0, "Memory Leaks")
     8
     9       #define checkLeaks false
     10
     11       #define checkMem() if(checkLeaks) mem()
  • 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
  • trunk/psLib/test/types/Makefile.am

    r8312 r8374  
    3232        tap_psMetadataItemCompare \
    3333        tap_psMetadataItemParse \
    34         tap_psMetadata_printing
     34        tap_psMetadata_printing \
     35        tap_psMetadata_copying
    3536
    3637
     
    7374tap_psMetadata_printing_CPPFLAGS   = $(AM_CPPFLAGS) -I$(top_srcdir)/test/tap/src
    7475tap_psMetadata_printing_LDFLAGS    = $(AM_LDFLAGS) $(top_builddir)/test/tap/src/libtap.la
     76
     77tap_psMetadata_copying_CPPFLAGS   = $(AM_CPPFLAGS) -I$(top_srcdir)/test/tap/src
     78tap_psMetadata_copying_LDFLAGS    = $(AM_LDFLAGS) $(top_builddir)/test/tap/src/libtap.la
    7579
    7680check_DATA = \
Note: See TracChangeset for help on using the changeset viewer.