Protect against stupid data from ACPI
authorHenning Rogge <henning.rogge@fkie.fraunhofer.de>
Mon, 22 Oct 2012 12:57:56 +0000 (14:57 +0200)
committerHenning Rogge <henning.rogge@fkie.fraunhofer.de>
Mon, 22 Oct 2012 12:57:56 +0000 (14:57 +0200)
commitc8e86b68f239f6e6cb17b66d1f8ae4dab7fcdea8
tree6b06b3d2d65c103dc516cb64a63f67b196879a5c
parentf105673f7c2430c2b23b3f0eb8bb4721f194361a
Protect against stupid data from ACPI

    Coverity:

    CID 739643 (#1 of 1): Division or modulo by zero (DIVIDE_BY_ZERO)
    At (29): In expression "bat_val * 100 / bat_max", division by expression "bat_max" which may be zero has undefined behavior.

Signed-off-by: Henning Rogge <henning.rogge@fkie.fraunhofer.de>
src/linux/apm.c