From: YoungHun Kim Date: Fri, 3 Jun 2022 00:43:45 +0000 (+0900) Subject: Fix coverity issue X-Git-Tag: submit/tizen/20220607.004037^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=935e0097d26a9da4ff42a22958b288fd8dadc232;p=platform%2Fcore%2Fmultimedia%2Fmmsvc-core.git Fix coverity issue - FORWARD_NULL Change-Id: I85c115161d608604c3b5679a7e9c0adc7c42c397 --- diff --git a/packaging/mused.spec b/packaging/mused.spec index 5d3c1483..c0a55fa4 100644 --- a/packaging/mused.spec +++ b/packaging/mused.spec @@ -1,6 +1,6 @@ Name: mused Summary: A multimedia daemon -Version: 0.3.150 +Version: 0.3.151 Release: 0 Group: System/Libraries License: Apache-2.0 diff --git a/server/src/muse_server_config.c b/server/src/muse_server_config.c index 1641c6b3..9e888f25 100644 --- a/server/src/muse_server_config.c +++ b/server/src/muse_server_config.c @@ -71,13 +71,13 @@ static int _ms_config_parser(ms_config_t *conf) } conf->logfile = _ms_config_get_str(conf->muse_dict, MUSE_LOG, NULL); - if (conf->logfile) + if (conf->logfile) { conf->log_enabled = (strncmp(conf->logfile, MUSE_USE_LOG, strlen(MUSE_USE_LOG) == 0)); - else + muse_core_remove_symlink(conf->logfile); + conf->fd = open(conf->logfile, O_CREAT | O_APPEND | O_WRONLY | O_NONBLOCK, 0644); + } else { conf->log_enabled = FALSE; - - muse_core_remove_symlink(conf->logfile); - conf->fd = open(conf->logfile, O_CREAT | O_APPEND | O_WRONLY | O_NONBLOCK, 0644); + } conf->lockfile = _ms_config_get_str(conf->muse_dict, MUSE_LOCK, NULL); if (!conf->lockfile) {