IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 1248


Ignore:
Timestamp:
Jul 20, 2004, 3:56:28 PM (22 years ago)
Author:
harman
Message:

Removed unnecessaty free

Location:
trunk/psLib/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/astro/psTime.c

    r1247 r1248  
    1212 *  @author Ross Harman, MHPCC
    1313 *
    14  *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2004-07-21 01:29:33 $
     14 *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2004-07-21 01:56:28 $
    1616 *
    1717 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2929#include "psTime.h"
    3030#include "psError.h"
    31 #define PS_ALLOW_MALLOC
    3231#include "psMemory.h"
    3332
     
    173172    // Converts psTime to YYYY/MM/DD,HH:MM:SS.SSS in string form
    174173    ms = time.tv_usec/1000;
     174
     175    // tmTime variable is statically allocated, no need to free
    175176    tmTime = gmtime(&time.tv_sec);
    176177    if(!strftime(tempString, MAX_TIME_STRING_LENGTH, "%Y/%m/%d,%H:%M:%S", tmTime)) {
     
    182183    }
    183184    psFree(tempString);
    184     free(tmTime);
    185185
    186186    return timeString;
  • trunk/psLib/src/astronomy/psTime.c

    r1247 r1248  
    1212 *  @author Ross Harman, MHPCC
    1313 *
    14  *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2004-07-21 01:29:33 $
     14 *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2004-07-21 01:56:28 $
    1616 *
    1717 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2929#include "psTime.h"
    3030#include "psError.h"
    31 #define PS_ALLOW_MALLOC
    3231#include "psMemory.h"
    3332
     
    173172    // Converts psTime to YYYY/MM/DD,HH:MM:SS.SSS in string form
    174173    ms = time.tv_usec/1000;
     174
     175    // tmTime variable is statically allocated, no need to free
    175176    tmTime = gmtime(&time.tv_sec);
    176177    if(!strftime(tempString, MAX_TIME_STRING_LENGTH, "%Y/%m/%d,%H:%M:%S", tmTime)) {
     
    182183    }
    183184    psFree(tempString);
    184     free(tmTime);
    185185
    186186    return timeString;
Note: See TracChangeset for help on using the changeset viewer.