diff options
-rw-r--r-- | src/battery_dump/bd_history_item.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/battery_dump/bd_history_item.c b/src/battery_dump/bd_history_item.c index 21c83eb..68b78d1 100644 --- a/src/battery_dump/bd_history_item.c +++ b/src/battery_dump/bd_history_item.c @@ -149,9 +149,6 @@ static int bd_get_and_print_system_base_battery_usage_from_dump(int fd, long int ENTER; int ret = BATTERY_MONITOR_ERROR_NONE; - GString *dump_p = NULL; - dump_p = g_string_sized_new(30); - BM_CHECK_MEM_ALLOC(dump_p, {}); float usage_mah = 0; time_t crr_time = 0; time(&crr_time); int uid_n = 1000; //For Tizen @@ -173,6 +170,9 @@ static int bd_get_and_print_system_base_battery_usage_from_dump(int fd, long int bm_resourceid_usage_free(res_use); } usage_mah /= 3600; + GString *dump_p = NULL; + dump_p = g_string_sized_new(30); + BM_CHECK_MEM_ALLOC(dump_p, {}); g_string_append(dump_p, TIZEN_DUMP_VERSION); g_string_append_printf(dump_p, ",%d,l,pwi,uid,", uid_n); g_string_append_printf(dump_p, "%0.2f", usage_mah); |