IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 12309


Ignore:
Timestamp:
Mar 7, 2007, 5:59:12 PM (19 years ago)
Author:
Paul Price
Message:

Backing off some assertion parameters that were only present in the add functions.

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

Legend:

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

    r12303 r12309  
    77 *  @author Joshua Hoblitt, University of Hawaii
    88 *
    9  *  @version $Revision: 1.63 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2007-03-08 02:13:31 $
     9 *  @version $Revision: 1.64 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2007-03-08 03:59:12 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    294294    psListElem* cursor = iterator->cursor;
    295295    psList* list = iterator->list;
     296
     297    if (cursor == NULL && list->head != NULL) {
     298        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
     299                _("Specified iterator is not valid."));
     300        return false;
     301    }
    296302
    297303    psListElem* elem = psAlloc(sizeof(psListElem));
     
    345351    psListElem* cursor = iterator->cursor;
    346352    psList* list = iterator->list;
     353
     354    if (cursor == NULL && list->head != NULL) {
     355        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
     356                _("Specified iterator is not valid."));
     357        return false;
     358    }
     359
    347360    psListElem* elem = psAlloc(sizeof(psListElem));
    348361
  • trunk/psLib/src/types/psList.h

    r12308 r12309  
    55 *  @author Robert Daniel DeSonia, MHPCC
    66 *
    7  *  @version $Revision: 1.44 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2007-03-08 03:51:11 $
     7 *  @version $Revision: 1.45 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2007-03-08 03:59:12 $
    99 *
    1010 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    284284
    285285#define PS_ASSERT_LIST_ITERATOR_NON_NULL(NAME, RVAL) \
    286 if (!(NAME) || !(NAME)->list || !(NAME)->list->iterators || (NAME)->list->n < 0 || \
    287     (!(NAME)->cursor && (NAME)->list->head)) { \
     286if (!(NAME) || !(NAME)->list || !(NAME)->list->iterators || (NAME)->list->n < 0) { \
    288287    psError(PS_ERR_BAD_PARAMETER_VALUE, true, \
    289288            "Error: List iterator %s or one of its components is NULL.", \
Note: See TracChangeset for help on using the changeset viewer.