IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 2621


Ignore:
Timestamp:
Dec 3, 2004, 2:04:33 PM (22 years ago)
Author:
evanalst
Message:

Updated error messages and return values for psHashAdd.

Location:
trunk/psLib/src
Files:
2 edited

Legend:

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

    r2273 r2621  
    1111*  @author George Gusciora, MHPCC
    1212*
    13 *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
    14 *  @date $Date: 2004-11-04 01:04:57 $
     13*  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
     14*  @date $Date: 2004-12-04 00:04:33 $
    1515*
    1616*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    332332
    333333/******************************************************************************
    334 psHashInsert(table, key, data, itemFree): this procedure, which is part of
     334psHashAdd(table, key, data): this procedure, which is part of
    335335the public API, inserts a new key/data pair into the hash table.
    336336Inputs:
     
    338338    key: the key to use
    339339    data: the data to insert.
    340     itemFree: a function pointer
    341340Return:
    342341    boolean value defining success or failure
     
    348347    if (table == NULL) {
    349348        psError(PS_ERR_BAD_PARAMETER_NULL, true,
     349                PS_ERRORTEXT_psHash_TABLE_NULL);
     350        return false;
     351    }
     352    if (key == NULL) {
     353        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    350354                PS_ERRORTEXT_psHash_KEY_NULL);
    351355        return false;
    352356    }
    353     if (key == NULL) {
    354         psError(PS_ERR_BAD_PARAMETER_NULL, true,
    355                 PS_ERRORTEXT_psHash_TABLE_NULL);
     357    if (data == NULL) {
     358        psError(PS_ERR_BAD_PARAMETER_NULL, true,
     359                PS_ERRORTEXT_psHash_DATA_NULL);
    356360        return false;
    357     }
    358     if (data == NULL) {
    359         psError(PS_ERR_BAD_PARAMETER_NULL, true,
    360                 PS_ERRORTEXT_psHash_DATA_NULL);
    361361    }
    362362
  • trunk/psLib/src/types/psHash.c

    r2273 r2621  
    1111*  @author George Gusciora, MHPCC
    1212*
    13 *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
    14 *  @date $Date: 2004-11-04 01:04:57 $
     13*  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
     14*  @date $Date: 2004-12-04 00:04:33 $
    1515*
    1616*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    332332
    333333/******************************************************************************
    334 psHashInsert(table, key, data, itemFree): this procedure, which is part of
     334psHashAdd(table, key, data): this procedure, which is part of
    335335the public API, inserts a new key/data pair into the hash table.
    336336Inputs:
     
    338338    key: the key to use
    339339    data: the data to insert.
    340     itemFree: a function pointer
    341340Return:
    342341    boolean value defining success or failure
     
    348347    if (table == NULL) {
    349348        psError(PS_ERR_BAD_PARAMETER_NULL, true,
     349                PS_ERRORTEXT_psHash_TABLE_NULL);
     350        return false;
     351    }
     352    if (key == NULL) {
     353        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    350354                PS_ERRORTEXT_psHash_KEY_NULL);
    351355        return false;
    352356    }
    353     if (key == NULL) {
    354         psError(PS_ERR_BAD_PARAMETER_NULL, true,
    355                 PS_ERRORTEXT_psHash_TABLE_NULL);
     357    if (data == NULL) {
     358        psError(PS_ERR_BAD_PARAMETER_NULL, true,
     359                PS_ERRORTEXT_psHash_DATA_NULL);
    356360        return false;
    357     }
    358     if (data == NULL) {
    359         psError(PS_ERR_BAD_PARAMETER_NULL, true,
    360                 PS_ERRORTEXT_psHash_DATA_NULL);
    361361    }
    362362
Note: See TracChangeset for help on using the changeset viewer.