don't use psec or pdays if NULL

This commit is contained in:
Dr. Stephen Henson 2012-11-20 15:20:40 +00:00
parent 360ef6769e
commit 598c423e65

View File

@ -289,8 +289,10 @@ int OPENSSL_gmtime_diff(struct tm *from, struct tm *to, int *pday, int *psec)
diff_sec -= SECS_PER_DAY;
}
*pday = (int)diff_day;
*psec = diff_sec;
if (pday)
*pday = (int)diff_day;
if (psec)
*psec = diff_sec;
return 1;