diff options
author | MyoungJune Park <mj2004.park@samsung.com> | 2016-09-23 17:41:17 +0900 |
---|---|---|
committer | Hyunho Kang <hhstark.kang@samsung.com> | 2016-09-23 02:09:11 -0700 |
commit | 5165f46db2c6f1d97dfb9cb49d0ac057ce425dfd (patch) | |
tree | b51d3eda83a648eb16c6cb516fe3411c7177d14c | |
parent | 4bd8e3ef4d219bb49cf1c816a5775a3d97ffc41b (diff) | |
download | widget-service-5165f46db2c6f1d97dfb9cb49d0ac057ce425dfd.tar.gz widget-service-5165f46db2c6f1d97dfb9cb49d0ac057ce425dfd.tar.bz2 widget-service-5165f46db2c6f1d97dfb9cb49d0ac057ce425dfd.zip |
Fixing build errorsubmit/tizen/20160923.052548accepted/tizen/wearable/20160926.000625accepted/tizen/tv/20160926.000607accepted/tizen/mobile/20160926.000551accepted/tizen/ivi/20160926.000643
- iniparser api spec modified
Change-Id: I1287de7f8694f02215f8ac747a233e7277954f15
Signed-off-by: MyoungJune Park <mj2004.park@samsung.com>
-rw-r--r-- | src/widget_service.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/widget_service.c b/src/widget_service.c index b63dac5..a77cce4 100644 --- a/src/widget_service.c +++ b/src/widget_service.c @@ -282,14 +282,14 @@ static int _resolution_update_from_file(void) int height_type = 0; int width = 0; int height = 0; - char *type_str; char *size_str; dictionary *dic; char *file_path = NULL; int key_num; - char **key_list; char key_format[MAX_COLUMN]; int i; + char **key_list; + const char *type_str; file_path = _resolution_file_path(); if (file_path == NULL) @@ -303,10 +303,11 @@ static int _resolution_update_from_file(void) snprintf(key_format, sizeof(key_format), "%s:%s", RESOLUTION_SECTION_NAME, RESOLUTION_FORMAT); key_num = iniparser_getsecnkeys(dic, RESOLUTION_SECTION_NAME); - key_list = iniparser_getseckeys(dic, RESOLUTION_SECTION_NAME); + key_list = (char**) malloc(sizeof(char*)*key_num); + key_list = iniparser_getseckeys(dic, RESOLUTION_SECTION_NAME, (const char**)key_list); for (i = 0; i < key_num; i++) { type_str = key_list[i]; - size_str = iniparser_getstring(dic, type_str, NULL); + size_str = iniparser_getstring(dic, (const char*)type_str, NULL); if (sscanf(type_str, key_format, &width_type, &height_type) != 2) { _E("Invalid syntax: [%s]", type_str); continue; @@ -319,7 +320,8 @@ static int _resolution_update_from_file(void) _resolution_update_size_list(width_type, height_type, width, height); } iniparser_freedict(dic); - + free(key_list); + key_list = NULL; return WIDGET_ERROR_NONE; } |