diff options
author | Minje Ahn <minje.ahn@samsung.com> | 2020-03-19 12:01:06 +0900 |
---|---|---|
committer | Minje Ahn <minje.ahn@samsung.com> | 2020-03-19 12:01:06 +0900 |
commit | b1fef980e4b388e3fa5e2bcfbf2102b27d4db06d (patch) | |
tree | bc9ffcb2406d7576d701130bd479313d87c1253e /src | |
parent | cb3ef94fbb3822ef03918ba8655890dec414208f (diff) | |
download | media-content-b1fef980e4b388e3fa5e2bcfbf2102b27d4db06d.tar.gz media-content-b1fef980e4b388e3fa5e2bcfbf2102b27d4db06d.tar.bz2 media-content-b1fef980e4b388e3fa5e2bcfbf2102b27d4db06d.zip |
Deleted some defines for code sync
Change-Id: I4f7f688c3a811f7f9c99d8b54ad0e2172f8f1764
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
Diffstat (limited to 'src')
-rwxr-xr-x | src/media_db.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/media_db.c b/src/media_db.c index c39df01..4004c9c 100755 --- a/src/media_db.c +++ b/src/media_db.c @@ -284,6 +284,7 @@ int _media_db_get_media_group_count(media_group_e group, filter_h filter, int *g char select_query[MAX_QUERY_SIZE] = {0, }; char *condition_query = NULL; char *option_query = NULL; + char *tmp_option = NULL; filter_s *_filter = (filter_s *)filter; memset(select_query, 0x00, sizeof(select_query)); @@ -306,17 +307,13 @@ int _media_db_get_media_group_count(media_group_e group, filter_h filter, int *g ret = __media_db_make_query(filter, &condition_query, &option_query); media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret); - SAFE_STRLCAT(select_query, QUERY_KEYWORD_SPACE, sizeof(select_query)); - if (STRING_VALID(condition_query)) { - SAFE_STRLCAT(select_query, QUERY_KEYWORD_AND, sizeof(select_query)); - SAFE_STRLCAT(select_query, condition_query, sizeof(select_query)); + if (option_query) { + tmp_option = g_strconcat(option_query, ")", NULL); + g_free(option_query); + option_query = tmp_option; + } else { + SAFE_STRLCAT(select_query, ")", sizeof(select_query)); } - if (STRING_VALID(option_query)) - SAFE_STRLCAT(select_query, option_query, sizeof(select_query)); - SAFE_STRLCAT(select_query, QUERY_KEYWORD_BRACKET, sizeof(select_query)); - - SAFE_FREE(condition_query); - SAFE_FREE(option_query); ret = _content_query_prepare(select_query, condition_query, option_query, &stmt); SAFE_FREE(condition_query); |