From edd928caf5e5d6d531aa8643b79acc13133d318b Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Fri, 30 Mar 2018 23:48:00 +0100 Subject: [PATCH] dtpdmd: Resolve some coverity warnings --- cde/programs/dtpdmd/dtpdmd.c | 2 ++ cde/programs/dtpdmd/manager.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cde/programs/dtpdmd/dtpdmd.c b/cde/programs/dtpdmd/dtpdmd.c index e4779440..68b5dd0a 100644 --- a/cde/programs/dtpdmd/dtpdmd.c +++ b/cde/programs/dtpdmd/dtpdmd.c @@ -162,6 +162,8 @@ static int generic_error_handler( edpy, eevent ) g.xerrno = eevent->error_code; g.xerrreq = eevent->request_code; g.xerrmin = eevent->minor_code; + + return 0; /* XSetErrorHandler handlers return values are ignored */ } /****************************************************************************** diff --git a/cde/programs/dtpdmd/manager.c b/cde/programs/dtpdmd/manager.c index b0f05864..1c60e0af 100644 --- a/cde/programs/dtpdmd/manager.c +++ b/cde/programs/dtpdmd/manager.c @@ -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; -- 2.25.1