summaryrefslogtreecommitdiff
path: root/src/freebsd
diff options
context:
space:
mode:
authorMariusz Ceier <mceier@gmail.com>2010-07-02 14:54:12 +0200
committerRichard Hughes <richard@hughsie.com>2010-07-02 14:04:42 +0100
commitac8fa9d5be28ab20a2827ec3a78b15495bd875f8 (patch)
treef7d5a466e7939a710d2c1d4560d0e7c465117b3a /src/freebsd
parent6770e8cb3462a37ac477b1750269763ec22e2b7a (diff)
downloadupower-ac8fa9d5be28ab20a2827ec3a78b15495bd875f8.tar.gz
up-device-supply.c: Fix #27902 Bug - Daemon Segmentation Fault
In linux backend, g_object_set was called with wrong argument types for time-to-empty,time-to-full and percentage properties. This patch uses explicit casts in the same way as freebsd backend. Signed-off-by: Mariusz Ceier <mceier@gmail.com>
Diffstat (limited to 'src/freebsd')
-rw-r--r--src/freebsd/up-device-supply.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/freebsd/up-device-supply.c b/src/freebsd/up-device-supply.c
index d3c2872..b499d57 100644
--- a/src/freebsd/up-device-supply.c
+++ b/src/freebsd/up-device-supply.c
@@ -112,8 +112,8 @@ up_device_supply_reset_values (UpDevice *device)
"energy-full-design", (gdouble) 0.0,
"energy-rate", (gdouble) 0.0,
"voltage", (gdouble) 0.0,
- "time-to-empty", (guint64) 0,
- "time-to-full", (guint64) 0,
+ "time-to-empty", (gint64) 0,
+ "time-to-full", (gint64) 0,
"percentage", (gdouble) 0.0,
"technology", UP_DEVICE_TECHNOLOGY_UNKNOWN,
NULL);
@@ -162,7 +162,7 @@ up_device_supply_battery_set_properties (UpDevice *device, UpAcpiNative *native)
gdouble volt, dvolt, rate, lastfull, cap, dcap, lcap, capacity;
gboolean is_present;
gboolean ret = FALSE;
- guint64 time_to_empty, time_to_full;
+ gint64 time_to_empty, time_to_full;
gchar *vendor, *model, *serial;
UpDeviceTechnology technology;
UpDeviceState state;