diff options
author | hj kim <backto.kim@samsung.com> | 2018-05-04 11:31:09 +0900 |
---|---|---|
committer | hj kim <backto.kim@samsung.com> | 2018-05-04 11:31:09 +0900 |
commit | 5a61addd894a5a5e485aa1dc8bf5ae03b4cc246f (patch) | |
tree | 8206929a698e8662d12e62476a37a71f20940cf3 | |
parent | 8200fa57abea597c660c8c2c48b85e55f61493ed (diff) | |
download | media-controller-5a61addd894a5a5e485aa1dc8bf5ae03b4cc246f.tar.gz media-controller-5a61addd894a5a5e485aa1dc8bf5ae03b4cc246f.tar.bz2 media-controller-5a61addd894a5a5e485aa1dc8bf5ae03b4cc246f.zip |
Coverity issue fixsubmit/tizen/20180504.024555accepted/tizen/unified/20180504.063634
Change-Id: I728bf41141647834063e370ff2fa357d2431a00a
-rwxr-xr-x | src/media_controller_db.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/media_controller_db.c b/src/media_controller_db.c index 7540d66..eba136d 100755 --- a/src/media_controller_db.c +++ b/src/media_controller_db.c @@ -126,6 +126,8 @@ static int __db_get_playlist(void *handle, const char *server_name, char **playl mc_retvm_if(handle == NULL, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "Handle is NULL"); mc_retvm_if(server_name == NULL, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "server_name is NULL"); + mc_retvm_if(playlist_name == NULL, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "playlist_name is NULL"); + mc_retvm_if(playlist == NULL, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "playlist is NULL"); sql_str = sqlite3_mprintf("SELECT * from %s WHERE server_name = %Q", MC_DB_TABLE_PLAYLIST, server_name); mc_retvm_if(!MC_STRING_VALID(sql_str), MEDIA_CONTROLLER_ERROR_INVALID_OPERATION, "SQL string is null"); @@ -173,13 +175,8 @@ static int __db_get_playlist(void *handle, const char *server_name, char **playl MC_SAFE_FREE(_raw_data); - if (playlist_name != NULL && playlist != NULL) { - *playlist_name = _name; - *playlist = _bundle_data; - } else { - mc_retvm_if(playlist_name == NULL, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "playlist_name is null"); - mc_retvm_if(playlist == NULL, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "playlist is null"); - } + *playlist_name = _name; + *playlist = _bundle_data; return MEDIA_CONTROLLER_ERROR_NONE; } |