IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 17, 2006, 4:24:13 PM (20 years ago)
Author:
Paul Price
Message:

Adding assertions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/sys/psTrace.c

    r8413 r8416  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.68 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2006-08-17 23:05:23 $
     11 *  @version $Revision: 1.69 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2006-08-18 02:24:13 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5353#include <string.h>
    5454#include <stdarg.h>
     55
     56#include "psAssert.h"
    5557#include "psMemory.h"
    5658#include "psTrace.h"
     
    7779static p_psComponent* componentAlloc(const char *name, int level)
    7880{
     81    assert(name);
     82
    7983    p_psComponent* comp = psAlloc(sizeof(p_psComponent));
    8084
     
    130134void p_psTraceReset(p_psComponent* currentNode)
    131135{
     136    assert(currentNode);
     137
    132138    psS32 i = 0;
    133139
     
    163169static psBool componentAdd(const char *addNodeName, psS32 level)
    164170{
     171    assert(addNodeName);
     172
    165173    psS32 i = 0;                        // Loop index variable.
    166174    char name[strlen(addNodeName) + 1]; // buffer for writeable copy.
     
    262270                    int level)  // desired trace level
    263271{
     272    PS_ASSERT_PTR_NON_NULL(comp, 0);
     273
    264274    char *compName = NULL;
    265275    int prevLevel = -1;
     
    322332static psS32 doGetTraceLevel(const char *aname)
    323333{
     334    assert(aname);
    324335    char name[strlen(aname) + 1];       // need a writeable copy: for strsep()
    325336    char *pname = name;
     
    393404int psTraceGetLevel(const char *name)
    394405{
     406    PS_ASSERT_PTR_NON_NULL(name, 0);
     407
    395408    psS32 traceLevel;
    396409
     
    452465                               psS32 defLevel)
    453466{
     467    assert(comp);
     468
    454469    char line[1024];
    455470    psS32 i = 0;
     
    644659)
    645660{
     661    PS_ASSERT_PTR_NON_NULL(file, );
     662    PS_ASSERT_PTR_NON_NULL(func, );
     663    PS_ASSERT_PTR_NON_NULL(facil, );
     664    PS_ASSERT_PTR_NON_NULL(format, );
     665
    646666    // XXX file & lineo are currently unused
    647667    va_list ap;
Note: See TracChangeset for help on using the changeset viewer.