summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDewal Agarwal <d1.agarwal@samsung.com>2020-05-06 11:41:57 +0530
committerDewal Agarwal <d1.agarwal@samsung.com>2020-05-06 11:41:57 +0530
commit363210884fa54c2687a4e13f8703fd58cf14a1b4 (patch)
treee5ddd2be24f8c77a65d0ae4ea8d3775ee391afaa
parentce991b3b149dd0d0b131b8caf4a3d76f3601e945 (diff)
downloadbatterymonitor-363210884fa54c2687a4e13f8703fd58cf14a1b4.tar.gz
batterymonitor-363210884fa54c2687a4e13f8703fd58cf14a1b4.tar.bz2
batterymonitor-363210884fa54c2687a4e13f8703fd58cf14a1b4.zip
Change-Id: I1f2c10c47c619d756de7e1282a132defc2159f62 Signed-off-by: Dewal Agarwal <d1.agarwal@samsung.com>
-rw-r--r--src/battery_dump/bd_history_item.c6
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);