From: Peter Howkins Date: Fri, 13 Jul 2018 18:16:00 +0000 (+0100) Subject: dtcm: Coverity 88069 X-Git-Tag: 2.3.0a~65 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a0edcdcc423b42441b10ff3c4b431905b6b86b2d;p=oweals%2Fcde.git dtcm: Coverity 88069 --- 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);