Project

General

Profile

Actions

Bug #3025

open

sys/dev/powermng/powernow/powernow.c:284: bad comparison ?

Added by dcb over 7 years ago. Updated about 7 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
04/11/2017
Due date:
% Done:

0%

Estimated time:

Description

sys/dev/powermng/powernow/powernow.c:284]: (style) Checking if unsigned variable 'vco_fid-vco_cfid' is less than zero.

Source code is

while (abs(vco_fid - vco_cfid) > 2) {

but

uint32_t    vco_fid, vco_cfid;

which means the expression given to abs is unsigned.
So the code only seems to do a one-sided test.


Files

0001-Fix-powernow.c.patch (1.13 KB) 0001-Fix-powernow.c.patch powernow.c patch lubos, 09/23/2017 07:43 AM
Actions

Also available in: Atom PDF