Changeset 158 in libcf for trunk/src/cf_util.c


Ignore:
Timestamp:
11/26/13 09:29:16 (10 years ago)
Author:
cheese
Message:

#1 add exception handling code for localtime function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/cf_util.c

    r154 r158  
    112112    gettimeofday (&timeVal, NULL);
    113113    timebuf = localtime ((const time_t *)&timeVal.tv_sec);
     114    if (timebuf == NULL)
     115        return CF_ERROR_UTIL_GET_LOCALTIME;
    114116
    115117    dt->year    = timebuf->tm_year + 1900;
Note: See TracChangeset for help on using the changeset viewer.