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,7 +289,9 @@ int OPENSSL_gmtime_diff(struct tm *from, struct tm *to, int *pday, int *psec)
diff_sec -= SECS_PER_DAY; diff_sec -= SECS_PER_DAY;
} }
if (pday)
*pday = (int)diff_day; *pday = (int)diff_day;
if (psec)
*psec = diff_sec; *psec = diff_sec;
return 1; return 1;