summaryrefslogtreecommitdiff
path: root/libdevkit-power
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2008-11-07 12:34:52 +0000
committerRichard Hughes <richard@hughsie.com>2008-11-07 12:34:52 +0000
commit885c3e474898b641f23d365688aa77852345996a (patch)
tree903c892c4628b222a49fef4e77175164b809e7a4 /libdevkit-power
parenteded5b20fc7b609f846a46c347b25109a40191a5 (diff)
bugfix: use 0 for unknown, not -1 as some values like rate and voltage are valid when negative
Diffstat (limited to 'libdevkit-power')
-rw-r--r--libdevkit-power/dkp-object.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/libdevkit-power/dkp-object.c b/libdevkit-power/dkp-object.c
index fa73504..931bc52 100644
--- a/libdevkit-power/dkp-object.c
+++ b/libdevkit-power/dkp-object.c
@@ -36,15 +36,15 @@ dkp_object_clear_internal (DkpObject *obj)
{
obj->type = DKP_DEVICE_TYPE_UNKNOWN;
obj->update_time = 0;
- obj->energy = -1;
- obj->energy_full = -1;
- obj->energy_full_design = -1;
- obj->energy_rate = -1;
- obj->voltage = -1;
- obj->percentage = -1;
- obj->capacity = -1;
- obj->time_to_empty = -1;
- obj->time_to_full = -1;
+ obj->energy = 0;
+ obj->energy_full = 0;
+ obj->energy_full_design = 0;
+ obj->energy_rate = 0;
+ obj->voltage = 0;
+ obj->percentage = 0;
+ obj->capacity = 0;
+ obj->time_to_empty = 0;
+ obj->time_to_full = 0;
obj->state = DKP_DEVICE_STATE_UNKNOWN;
obj->technology = DKP_DEVICE_TECHNOLGY_UNKNOWN;
obj->vendor = NULL;