[haiku-bugs] Re: [Haiku] #7810: Deskbar crashs when Battery::GetBatteryInfoCached

  • From: "tqh" <trac@xxxxxxxxxxxx>
  • Date: Thu, 28 Nov 2013 10:16:31 -0000

#7810: Deskbar crashs when Battery::GetBatteryInfoCached
----------------------------------------+----------------------------
   Reporter:  Arnaud M.                 |      Owner:  axeld
       Type:  bug                       |     Status:  new
   Priority:  normal                    |  Milestone:  R1
  Component:  Applications/PowerStatus  |    Version:  R1/Development
 Resolution:                            |   Keywords:
 Blocked By:                            |   Blocking:
Has a Patch:  0                         |   Platform:  x86
----------------------------------------+----------------------------

Comment (by tqh):

 IMO GetMeanRate return value should be checked and the logic have
 different cases for 0, -1 and >0.
 -1: a error code (-1?), currently it is used in calculation.
 0: should return infinity.
 greater than 0: calculate.

 Perhaps this shouldn't be integer math at all.

--
Ticket URL: <http://dev.haiku-os.org/ticket/7810#comment:12>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: