another-time_t-pointer-bug-20060320

do not pass pointers to 32-bit values as pointers to 64-bit values.
this results in memory corruption
This commit is contained in:
Jeffrey Altman 2006-03-20 13:25:50 +00:00
parent 3f061cc2c3
commit 1b2fbe5fa9

View File

@ -115,8 +115,9 @@ int
ktimeDate_FromInt32(afs_int32 timeSecs, struct ktime_date *ktimePtr)
{
struct tm *timePtr;
time_t tt = timeSecs;
timePtr = localtime((time_t *) & timeSecs);
timePtr = localtime(&tt);
/* copy the relevant fields */
ktimePtr->sec = timePtr->tm_sec;