IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 2699


Ignore:
Timestamp:
Dec 10, 2004, 3:24:15 PM (22 years ago)
Author:
desonia
Message:

fixed errorneous warning in psListAdd.

Location:
trunk/psLib
Files:
4 edited

Legend:

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

    r2698 r2699  
    66 *  @author Robert Daniel DeSonia, MHPCC
    77 *
    8  *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-12-11 01:19:06 $
     8 *  @version $Revision: 1.26 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2004-12-11 01:24:14 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    257257    }
    258258
    259     if (location >= (int)list->size) {
     259    if (location > 0 && location >= (int)list->size) {
    260260        psLogMsg(__func__,PS_LOG_WARN,
    261261                 "Specified location, %d, is beyond the end of the list.  "
  • trunk/psLib/src/types/psList.c

    r2698 r2699  
    66 *  @author Robert Daniel DeSonia, MHPCC
    77 *
    8  *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-12-11 01:19:06 $
     8 *  @version $Revision: 1.26 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2004-12-11 01:24:14 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    257257    }
    258258
    259     if (location >= (int)list->size) {
     259    if (location > 0 && location >= (int)list->size) {
    260260        psLogMsg(__func__,PS_LOG_WARN,
    261261                 "Specified location, %d, is beyond the end of the list.  "
  • trunk/psLib/test/collections/tst_psList.c

    r2698 r2699  
    66 *  @author Robert DeSonia, MHPCC
    77 *
    8  *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-12-11 01:19:06 $
     8 *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2004-12-11 01:24:15 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
  • trunk/psLib/test/collections/verified/tst_psList.stderr

    r2281 r2699  
    1818<DATE><TIME>|<HOST>|I|testListAdd
    1919    psListAdd shall add an element to list
     20<DATE><TIME>|<HOST>|E|psListAdd (psList.c:<LINENO>)
     21    Specified psList reference is NULL.
     22<DATE><TIME>|<HOST>|E|psListAdd (psList.c:<LINENO>)
     23    Specified data item is NULL.
    2024<DATE><TIME>|<HOST>|I|testListAdd
    2125    Following should error with invalid insert location
    22 <DATE><TIME>|<HOST>|W|psListAdd
    23     The given insert location (-10) for psListAdd is invalid.
     26<DATE><TIME>|<HOST>|E|psListIteratorSet (psList.c:<LINENO>)
     27    Specified location, -10, is invalid.
    2428<DATE><TIME>|<HOST>|I|testListAdd
    2529    Following should be a warning.
    2630<DATE><TIME>|<HOST>|W|psListAdd
    27     Invalid index 9 (only 6 elements in psList); assuming tail.
     31    Specified location, 9, is beyond the end of the list.  Adding data item to tail.
    2832
    2933---> TESTPOINT PASSED (psList{psListAdd} | tst_psList.c)
     
    3741<DATE><TIME>|<HOST>|I|testListGet
    3842    Following should be an error
    39 <DATE><TIME>|<HOST>|E|listSetIterator (psList.c:<LINENO>)
    40     Unexpected null pointer for psList parameter.
     43<DATE><TIME>|<HOST>|E|psListGet (psList.c:<LINENO>)
     44    Specified psList reference is NULL.
     45<DATE><TIME>|<HOST>|E|psListIteratorSet (psList.c:<LINENO>)
     46    Specified location, 5, is invalid.
     47<DATE><TIME>|<HOST>|E|psListGet (psList.c:<LINENO>)
     48    Specified location, 5, is invalid.
     49<DATE><TIME>|<HOST>|E|psListIteratorSet (psList.c:<LINENO>)
     50    Specified location, 4, is invalid.
     51<DATE><TIME>|<HOST>|E|psListGet (psList.c:<LINENO>)
     52    Specified location, 4, is invalid.
    4153
    4254---> TESTPOINT PASSED (psList{psListGet} | tst_psList.c)
     
    5163    Following should be an error
    5264<DATE><TIME>|<HOST>|E|psListRemove (psList.c:<LINENO>)
    53     list parameter found to be NULL.
     65    Specified psList reference is NULL.
    5466<DATE><TIME>|<HOST>|I|testListRemove
    5567    Next message should be an error
    56 <DATE><TIME>|<HOST>|E|psListRemove (psList.c:<LINENO>)
    57     Couldn't position to given index (-4) to remove element from list.
     68<DATE><TIME>|<HOST>|E|psListRemoveData (psList.c:<LINENO>)
     69    Specified data item is NULL.
    5870<DATE><TIME>|<HOST>|I|testListRemove
    5971    Next message should be an error
    60 <DATE><TIME>|<HOST>|E|psListRemove (psList.c:<LINENO>)
    61     Couldn't position to given index (-2) to remove element from list.
    62 <DATE><TIME>|<HOST>|I|testListRemove
    63     Next message should be an error
    64 <DATE><TIME>|<HOST>|E|psListRemove (psList.c:<LINENO>)
    65     Failed to find item in given psList.
    66 <DATE><TIME>|<HOST>|I|testListRemove
    67     Next message should be an error
    68 <DATE><TIME>|<HOST>|E|psListRemove (psList.c:<LINENO>)
    69     Failed to find item in given psList.
     72<DATE><TIME>|<HOST>|E|psListRemoveData (psList.c:<LINENO>)
     73    Specified data item is not found in the psList.
    7074
    7175---> TESTPOINT PASSED (psList{psListRemove} | tst_psList.c)
     
    9094<DATE><TIME>|<HOST>|I|testListIterator
    9195    Following should error with 'Unexpected null pointer'
    92 <DATE><TIME>|<HOST>|E|listSetIterator (psList.c:<LINENO>)
    93     Unexpected null pointer for psList parameter.
    94 <DATE><TIME>|<HOST>|I|testListIterator
    95     Following should error with 'Can't move to an unknown position.'
    96 <DATE><TIME>|<HOST>|E|listSetIterator (psList.c:<LINENO>)
    97     Can't move to an unknown position.  Not moving the iterator position.
    9896
    9997---> TESTPOINT PASSED (psList{psListIterator} | tst_psList.c)
Note: See TracChangeset for help on using the changeset viewer.