diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2008-01-24 22:22:46 +0000 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2008-01-24 22:22:46 +0000 | 
| commit | 613cc5583465b2fa35288a2f28d0e408904c4fd9 (patch) | |
| tree | 174bf1a006e28d3c7c977896205fa501c7d93234 /lib/misc.c | |
| parent | a882d6c1eec55fb9a00ce61acd6d776884d0c84a (diff) | |
Fixed two valgrind warnings (partially uninitialized "struct tm" vars.)
Diffstat (limited to 'lib/misc.c')
| -rw-r--r-- | lib/misc.c | 2 | 
1 files changed, 2 insertions, 0 deletions
| @@ -89,12 +89,14 @@ time_t get_time(int year, int month, int day, int hour, int min, int sec)  {  	struct tm tm; +	memset(&tm, 0, sizeof(struct tm));  	tm.tm_year = year - 1900;  	tm.tm_mon = month - 1;  	tm.tm_mday = day;  	tm.tm_hour = hour;  	tm.tm_min = min;  	tm.tm_sec = sec >= 0 ? sec : time(NULL) % 60; +	  	return mktime(&tm);  } | 
