integer initial declarations move to out of loop 11/137711/1
authorjungkon.kim <jungkon.kim@samsung.com>
Fri, 7 Jul 2017 07:08:08 +0000 (16:08 +0900)
committerjungkon.kim <jungkon.kim@samsung.com>
Fri, 7 Jul 2017 07:08:27 +0000 (16:08 +0900)
Change-Id: I0fc1ad417917fe318f42ec3cb59f51f9d50bfdae

ui/src/privacy_guard_package_list_view.c

index 719114ed5760c37c9e0772ebf8c181f15e593246..c8bcd32d917481537bf856eaad61c1d08bed08fe 100644 (file)
@@ -118,16 +118,15 @@ static void free_item(pg_item_data_s *data, int *is_description)
 static void _create_privacy_guard_item_list(void)
 {
        item_list = (pg_item_data_s **)malloc(sizeof(pg_item_data_s *) * len);
-
-       for (int j = 0; j < len; j++)
+       int j = 0;
+       for (j = 0; j < len; j++)
                item_list[j] = (pg_item_data_s *)malloc(sizeof(pg_item_data_s));
 }
 static void _free_privacy_guard_item_list(void)
 {
-
        int is_description = 0;
-
-       for (int j = 0; j < len; j++) {
+       int j = 0;
+       for (j = 0; j < len; j++) {
                free_item(item_list[j], &is_description);
                free(item_list[j]);
        }