Changeset 613cc55 for lib


Ignore:
Timestamp:
2008-01-24T22:22:46Z (17 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
b5c8a34
Parents:
a882d6c
Message:

Fixed two valgrind warnings (partially uninitialized "struct tm" vars.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/misc.c

    ra882d6c r613cc55  
    9090        struct tm tm;
    9191
     92        memset(&tm, 0, sizeof(struct tm));
    9293        tm.tm_year = year - 1900;
    9394        tm.tm_mon = month - 1;
     
    9697        tm.tm_min = min;
    9798        tm.tm_sec = sec >= 0 ? sec : time(NULL) % 60;
     99       
    98100        return mktime(&tm);
    99101}
Note: See TracChangeset for help on using the changeset viewer.