From a0edcdcc423b42441b10ff3c4b431905b6b86b2d Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Fri, 13 Jul 2018 19:16:00 +0100 Subject: [PATCH] dtcm: Coverity 88069 --- cde/programs/dtcm/dtcm/timezone.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cde/programs/dtcm/dtcm/timezone.c b/cde/programs/dtcm/dtcm/timezone.c index e7dfa4a1..09799084 100644 --- a/cde/programs/dtcm/dtcm/timezone.c +++ b/cde/programs/dtcm/dtcm/timezone.c @@ -68,7 +68,7 @@ make_timezone(Calendar *c) XmString xmstr; int ac; Arg args[10]; - char buf[BUFSIZ], tmp_buf[BUFSIZ]; + char buf[BUFSIZ], tmp_buf[BUFSIZ] = ""; char *title; void tz_customtime_cb(), tz_mytime_cb(), tz_apply_cb(), tz_cancel_cb(), tz_ok_cb(); @@ -296,8 +296,7 @@ make_timezone(Calendar *c) cm_strcpy(t->gmttimezone, ""); cm_strcpy(t->mytimezone, "US/Pacific"); cm_strcpy(tmp_buf, (char*)getenv("TZ")); - if (tmp_buf) - cm_strcpy(t->mytimezone, tmp_buf); + cm_strcpy(t->mytimezone, tmp_buf); sprintf(buf, "%s %s", catgets(c->DT_catd, 1, 659, "Time Zone:"), t->mytimezone); -- 2.25.1