dtpdmd: Resolve some coverity warnings

This commit is contained in:
Peter Howkins
2018-03-30 23:48:00 +01:00
parent bcccf559ce
commit edd928caf5
2 changed files with 4 additions and 2 deletions

View File

@@ -475,7 +475,7 @@ void mgr_launch_pdm( XpPdmServiceRec *rec )
/*
* Set XAUTHORITY env var if needed.
*/
if ((rec->cookie_cnt) && (rec->auth_filename) && (rec->auth_file)) {
if ((rec->cookie_cnt) && (rec->auth_file)) {
envstr = Xmalloc( strlen(rec->auth_filename) + 12 );
sprintf( envstr, "XAUTHORITY=%s", rec->auth_filename );
putenv( envstr );
@@ -513,7 +513,7 @@ void mgr_launch_pdm( XpPdmServiceRec *rec )
*/
void mgr_fetch_pdm( XpPdmServiceRec *rec )
{
char tstr[1024], *tptr1, *tptr2, *tptr3;
char tstr[1024], *tptr1 = NULL, *tptr2, *tptr3;
int firstTime;
long now;
Display *tdpy;