From: aravind.gara Date: Thu, 2 Nov 2017 10:08:05 +0000 (+0900) Subject: Fix Coverity Issues-2 X-Git-Tag: submit/tizen/20171106.073235^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F73%2F158673%2F3;p=platform%2Fcore%2Fapi%2Fsound-pool.git Fix Coverity Issues-2 Fix local issues got by Coverity script [Version] 0.0.11 [Issue Type] Security Change-Id: Ic4c0988e39e7224fee03804166fe981a865955f5 Signed-off-by: aravind.gara --- diff --git a/packaging/capi-media-sound-pool.spec b/packaging/capi-media-sound-pool.spec index a6bfafd..34b0b57 100644 --- a/packaging/capi-media-sound-pool.spec +++ b/packaging/capi-media-sound-pool.spec @@ -1,5 +1,5 @@ Name: capi-media-sound-pool -Version: 0.0.10 +Version: 0.0.11 Summary: Tizen Sound Pool module Release: 0 Group: Multimedia/Framework diff --git a/test/proxy/src/proxy.c b/test/proxy/src/proxy.c index 1719b75..a9c3afa 100644 --- a/test/proxy/src/proxy.c +++ b/test/proxy/src/proxy.c @@ -680,7 +680,7 @@ static int __proxy_sound_pool_load_source_from_file(const char *pars) /* If tag wasn't specified by the user, we will use file path as a tag */ if (tag[0] == '\0') - strncpy(tag, fname, MAX_PATH_LEN); + strncpy(tag, fname, MAX_PATH_LEN - 1); _logger_log_info(CMD_LOAD_SOURCE " command was called"); _logger_log_info("Loading source to the pool with %zu identifier from %s file. " @@ -1064,8 +1064,6 @@ static int __proxy_sound_pool_get_stream_state(const char *pars) /* CMD_SLEEP */ static int __proxy_sleep(const char *pars) { - int ret = SOUND_POOL_ERROR_NONE; - useconds_t stime = 0; if ((pars == NULL) || (sscanf(pars, " %u", &stime) < 1)) { @@ -1080,7 +1078,7 @@ static int __proxy_sleep(const char *pars) usleep(stime); _logger_log_info("Main thread sleep has been finished...", stime); - return (ret == SOUND_POOL_ERROR_NONE ? OK : FAIL); + return OK; } /* CMD_EXECUTE_SCRIPT */