IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 6962


Ignore:
Timestamp:
Apr 22, 2006, 3:08:34 PM (20 years ago)
Author:
magnier
Message:

changed psStringSplit to accept NULL input string

File:
1 edited

Legend:

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

    r6874 r6962  
    1313 *  @author David Robbins, MHPCC
    1414 *
    15  *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
    16  *  @date $Date: 2006-04-17 22:00:03 $
     15 *  @version $Revision: 1.26 $ $Name: not supported by cvs2svn $
     16 *  @date $Date: 2006-04-23 01:08:34 $
    1717 *
    1818 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    177177                      const char *splitters)
    178178{
    179     PS_ASSERT_PTR_NON_NULL(string, NULL);
    180179    PS_ASSERT_PTR_NON_NULL(splitters, NULL);
    181 
    182180    psList *values = psListAlloc(NULL); // The list of values to return
     181    if (string == NULL)
     182        return values;
     183
    183184    unsigned int length = strlen(string); // The length of the string
    184185    unsigned int numSplitters = strlen(splitters); // Number of characters that might split
Note: See TracChangeset for help on using the changeset viewer.