IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 7, 2007, 6:22:23 PM (19 years ago)
Author:
Paul Price
Message:

Removing extraneous +1.

File:
1 edited

Legend:

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

    r15498 r15502  
    1313 *  @author David Robbins, MHPCC
    1414 *
    15  *  @version $Revision: 1.58 $ $Name: not supported by cvs2svn $
    16  *  @date $Date: 2007-11-08 03:12:24 $
     15 *  @version $Revision: 1.59 $ $Name: not supported by cvs2svn $
     16 *  @date $Date: 2007-11-08 04:22:23 $
    1717 *
    1818 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    3636static void stringFree(psString string)
    3737{
    38     // this function is only nessicary so psMemCheckString has a function
     38    // this function is only necessary so psMemCheckString has a function
    3939    // pointer address to test against
    4040}
     
    4646                         size_t nChar)
    4747{
    48     if (nChar < 1) {
    49         return NULL;
    50     }
    51 
    5248    psString string = p_psAlloc(file, lineno, func, nChar + 1);
    5349    psMemSetDeallocator(string, (psFreeFunc)stringFree);
     
    7571
    7672    // Output string
    77     psString output = p_psStringAlloc(file, lineno, func, strlen(string) + 1);
     73    psString output = p_psStringAlloc(file, lineno, func, strlen(string));
    7874
    7975    // Copy input string to memory just allocated
     
    10298    }
    10399
    104     nChar = PS_MIN(nChar, strlen(string));
    105 
    106100    // Copy input string to memory allocated up to nChar characters
    107     psString output = p_psStringAlloc(file, lineno, func, nChar + 1);
     101    psString output = p_psStringAlloc(file, lineno, func, nChar);
    108102    output = strncpy(output, string, nChar);
    109103
Note: See TracChangeset for help on using the changeset viewer.