IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 9720 for trunk/psLib/src/types


Ignore:
Timestamp:
Oct 23, 2006, 3:15:47 PM (20 years ago)
Author:
drobbin
Message:

Edited psMetadataCopy and relevant tests. Removed the psFree(out)'s as requested. Minor doxygen changes to the psMetadataConfig's.

Location:
trunk/psLib/src/types
Files:
3 edited

Legend:

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

    r9665 r9720  
    1212 *  @author Ross Harman, MHPCC
    1313 *
    14  *  @version $Revision: 1.143 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2006-10-20 00:17:21 $
     14 *  @version $Revision: 1.144 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2006-10-24 01:15:47 $
    1616 *
    1717 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    417417    if (in == NULL) {
    418418        psError(PS_ERR_BAD_PARAMETER_NULL, true, "psMetadataCopy: 'in' cannot be NULL");
    419         psFree(out);
    420419        return NULL;
    421420    }
     
    424423    if (in->list == NULL) {
    425424        psError(PS_ERR_BAD_PARAMETER_NULL, true, "psMetadataCopy: 'in' has NULL list");
    426         psFree(out);
    427         return NULL;
    428     }
    429 
     425        return NULL;
     426    }
     427    bool outAlloced = false;
    430428    if (out ==  NULL) {
    431429        out = psMetadataAlloc();
     430        outAlloced = true;
    432431    }
    433432    psMetadataIterator *iter = psMetadataIteratorAlloc(in, PS_LIST_HEAD, NULL);
     
    450449            psFree(newItem);
    451450            psFree(iter);
    452             psFree(out);
     451            if (outAlloced) {
     452                psFree(out);
     453            }
    453454            return NULL;
    454455        }
     
    507508    psMetadataItem *existingEntry = NULL;
    508509
    509     PS_ASSERT_PTR_NON_NULL(md,NULL);
    510     PS_ASSERT_PTR_NON_NULL(md->hash,NULL);
    511     PS_ASSERT_PTR_NON_NULL(md->list,NULL);
    512     PS_ASSERT_PTR_NON_NULL(item,NULL);
    513     PS_ASSERT_PTR_NON_NULL(item->name,NULL);
     510    PS_ASSERT_PTR_NON_NULL(md,false);
     511    PS_ASSERT_PTR_NON_NULL(md->hash,false);
     512    PS_ASSERT_PTR_NON_NULL(md->list,false);
     513    PS_ASSERT_PTR_NON_NULL(item,false);
     514    PS_ASSERT_PTR_NON_NULL(item->name,false);
    514515
    515516    mdTable = md->hash;
  • trunk/psLib/src/types/psMetadataConfig.c

    r9543 r9720  
    1 /** @file  psMetadataIO.c
     1/** @file  psMetadataConfig.c
    22*
    33*  @brief Contains metadata input/output functions.
     
    1010*  @author Eric Van Alst, MHPCC
    1111*
    12 *  @version $Revision: 1.94 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2006-10-13 22:25:45 $
     12*  @version $Revision: 1.95 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2006-10-24 01:15:47 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
  • trunk/psLib/src/types/psMetadataConfig.h

    r8794 r9720  
    1010 *  @author Robert DeSonia, MHPCC
    1111 *
    12  *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2006-09-12 04:18:56 $
     12 *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2006-10-24 01:15:47 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    1717#ifndef PS_METADATACONFIG_H
    1818#define PS_METADATACONFIG_H
     19
     20#include "psMetadata.h"
    1921
    2022/// @addtogroup Metadata
Note: See TracChangeset for help on using the changeset viewer.