tools/tiff2pdf.c:4036: error: Null Dereference
  pointer `currenttime` last assigned on line 4034 could be null and is dereferenced at line 4036, column 4.

tools/tiff2pdf.c:4027:1: start of procedure t2p_pdf_currenttime()
4025.  */
4026. 
4027. void t2p_pdf_currenttime(T2P* t2p)
      ^
4028. {
4029. 

tools/tiff2pdf.c:4033:2: 
4031. 	time_t timenow;
4032. 
4033. 	timenow=time(0);
       ^
4034. 	currenttime=localtime(&timenow);
4035. 	sprintf((char *)t2p->pdf_datetime, "D:%.4d%.2d%.2d%.2d%.2d%.2d",

tools/tiff2pdf.c:4034:2: 
4032. 
4033. 	timenow=time(0);
4034. 	currenttime=localtime(&timenow);
       ^
4035. 	sprintf((char *)t2p->pdf_datetime, "D:%.4d%.2d%.2d%.2d%.2d%.2d",
4036. 		(currenttime->tm_year+1900) % 65536, 

tools/tiff2pdf.c:4035:2: 
4033. 	timenow=time(0);
4034. 	currenttime=localtime(&timenow);
4035. 	sprintf((char *)t2p->pdf_datetime, "D:%.4d%.2d%.2d%.2d%.2d%.2d",
       ^
4036. 		(currenttime->tm_year+1900) % 65536, 
4037. 		(currenttime->tm_mon+1) % 256, 

void t2p_pdf_currenttime(T2P* t2p)
{
	struct tm* currenttime;
	time_t timenow;
	timenow=time(0);
	currenttime=localtime(&timenow);
	sprintf((char *)t2p->pdf_datetime, "D:%.4d%.2d%.2d%.2d%.2d%.2d",
		(currenttime->tm_year+1900) % 65536,
		(currenttime->tm_mon+1) % 256,
		(currenttime->tm_mday) % 256,
		(currenttime->tm_hour) % 256,
		(currenttime->tm_min) % 256,
		(currenttime->tm_sec) % 256);
	return;
}
['void t2p_pdf_currenttime(T2P* t2p)\n{\n\tstruct tm* currenttime;\n\ttime_t timenow;\n\ttimenow=time(0);\n\tcurrenttime=localtime(&timenow);\n\tsprintf((char *)t2p->pdf_datetime, "D:%.4d%.2d%.2d%.2d%.2d%.2d",\n\t\t(currenttime->tm_year+1900) % 65536,\n\t\t(currenttime->tm_mon+1) % 256,\n\t\t(currenttime->tm_mday) % 256,\n\t\t(currenttime->tm_hour) % 256,\n\t\t(currenttime->tm_min) % 256,\n\t\t(currenttime->tm_sec) % 256);\n\treturn;\n}']