int test_batch_operations()
{
int ret = -1;
- int i;
+ int i = 0;
char *file_list[10];
for (i = 0; i < 10; i++) {
media_content_error("media_info_insert_batch_to_db failed : %d\n", ret);
filter_h filter;
- char *condition = "MEDIA_PATH LIKE \'";
- strncat(condition, tzplatform_mkpath(TZ_USER_CONTENT, "test/image%%jpg\'"), 17);
+ char condition[2048] = {0, };
+ const char *temp = NULL;
+ memset(condition, 0x00, sizeof(condition));
+
+ temp = tzplatform_mkpath(TZ_USER_CONTENT, "test/image%%jpg\'");
+ snprintf(condition, sizeof(condition), "MEDIA_PATH LIKE \'%s", temp);
+
ret = media_filter_create(&filter);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
media_content_error("Fail to create filter");
filter_h filter;
char condition[2048] = {0,};
const char *temp = NULL;
+ memset(condition, 0x00, sizeof(condition));
+
temp = tzplatform_mkpath(TZ_USER_CONTENT, "test/image%%\'");
snprintf(condition, sizeof(condition), "MEDIA_PATH LIKE \'%s", temp);