IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 14, 2008, 2:45:18 PM (18 years ago)
Author:
eugene
Message:

use a local char for the temporary pointer

File:
1 edited

Legend:

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

    r15523 r19070  
    1313 *  @author David Robbins, MHPCC
    1414 *
    15  *  @version $Revision: 1.60 $ $Name: not supported by cvs2svn $
    16  *  @date $Date: 2007-11-09 00:47:41 $
     15 *  @version $Revision: 1.61 $ $Name: not supported by cvs2svn $
     16 *  @date $Date: 2008-08-15 00:45:18 $
    1717 *
    1818 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    158158    // find the size of the string to append
    159159    // C99 guarentees vsnprintf() to work as expected with size = 0
     160    // BUT: the output cannot be a NULL string
    160161    va_copy(apCopy, ap);
    161     tailLength = vsnprintf(*dest, 0, format, apCopy);
     162    char tmp = 0;
     163    tailLength = vsnprintf(&tmp, 0, format, apCopy);
    162164    va_end(apCopy);
    163165
     
    240242    // C99 guarentees vsnprintf() to work as expected with size = 0
    241243    va_copy(apCopy, ap);
    242     headLength = vsnprintf(*dest, 0, format, apCopy);
     244    char tmp = 0;
     245    headLength = vsnprintf(&tmp, 0, format, apCopy);
    243246    va_end(apCopy);
    244247
Note: See TracChangeset for help on using the changeset viewer.