IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 12303


Ignore:
Timestamp:
Mar 7, 2007, 4:13:31 PM (19 years ago)
Author:
Paul Price
Message:

Fixing some assertions that had <= instead of <

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

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/types/psArray.h

    r11701 r12303  
    1010 *  @author Joshua Hoblitt, University of Hawaii
    1111 *
    12  *  @version $Revision: 1.47 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2007-02-08 03:34:09 $
     12 *  @version $Revision: 1.48 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2007-03-08 02:13:31 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    242242#define PS_ASSERT_ARRAY_NON_NULL(NAME, RETURNVAL) PS_ASSERT_GENERAL_ARRAY_NON_NULL(NAME, return RETURNVAL)
    243243#define PS_ASSERT_GENERAL_ARRAY_NON_NULL(NAME, CLEANUP) \
    244 if ((NAME) == NULL || (NAME)->data == NULL) { \
     244if ((NAME) == NULL || (NAME)->data == NULL || (NAME)->n < 0) { \
    245245    psError(PS_ERR_BAD_PARAMETER_NULL, true, \
    246246            "Unallowable operation: psArray %s or its data is NULL.", \
  • trunk/psLib/src/types/psHash.h

    r12289 r12303  
    1111 *  @author GLG, MHPCC
    1212 *
    13  *  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2007-03-07 02:50:15 $
     13 *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2007-03-08 02:13:31 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    114114
    115115#define PS_ASSERT_HASH_NON_NULL(NAME, RVAL) \
    116 if (!(NAME) || !(NAME)->buckets || (NAME)->n <= 0) { \
     116if (!(NAME) || !(NAME)->buckets || (NAME)->n < 0) { \
    117117    psError(PS_ERR_BAD_PARAMETER_VALUE, true, \
    118118            "Error: Hash %s or one of its components is NULL.", \
  • trunk/psLib/src/types/psList.c

    r12289 r12303  
    77 *  @author Joshua Hoblitt, University of Hawaii
    88 *
    9  *  @version $Revision: 1.62 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2007-03-07 02:50:15 $
     9 *  @version $Revision: 1.63 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2007-03-08 02:13:31 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    258258    PS_ASSERT_PTR_NON_NULL(data, false);
    259259
    260     if (location > 0 && location >= (int)list->n) {
     260    if (location >= list->n) {
    261261        psLogMsg(__func__,PS_LOG_WARN,
    262262                 "Specified location, %ld, is beyond the end of the list.  "
  • trunk/psLib/src/types/psList.h

    r12289 r12303  
    55 *  @author Robert Daniel DeSonia, MHPCC
    66 *
    7  *  @version $Revision: 1.41 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2007-03-07 02:50:15 $
     7 *  @version $Revision: 1.42 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2007-03-08 02:13:31 $
    99 *
    1010 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    276276
    277277#define PS_ASSERT_LIST_NON_NULL(NAME, RVAL) \
    278 if (!(NAME) || !(NAME)->iterators || (NAME)->n <= 0) { \
     278if (!(NAME) || !(NAME)->iterators || (NAME)->n < 0) { \
    279279    psError(PS_ERR_BAD_PARAMETER_VALUE, true, \
    280280            "Error: List %s or one of its components is NULL.", \
     
    284284
    285285#define PS_ASSERT_LIST_ITERATOR_NON_NULL(NAME, RVAL) \
    286 if (!(NAME) || !(NAME)->list || !(NAME)->list->iterators || (NAME)->list->n <= 0 || \
     286if (!(NAME) || !(NAME)->list || !(NAME)->list->iterators || (NAME)->list->n < 0 || \
    287287    (!(NAME)->cursor && (NAME)->list->head) || (NAME)->index <= 0) { \
    288288    psError(PS_ERR_BAD_PARAMETER_VALUE, true, \
Note: See TracChangeset for help on using the changeset viewer.