diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2018-01-14 00:33:10 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2018-01-14 00:33:10 +0000 |
commit | 5acc564155080668fa067fb762ed2672e9f3f23b (patch) | |
tree | 8997413ee0e01453240b581d6fc821ab76403174 /sys/arch/amd64 | |
parent | 047b9ad617154f046ac2742aff7d9718e35ece57 (diff) |
Use signed values to compare absolute difference. The variables
fid and cfid are signed, so the FID_TO_VCO_FID() macro creates
signed results. Keep the sign when passing to abs() although the
implicit conversions created the same binary.
OK deraadt@
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r-- | sys/arch/amd64/amd64/powernow-k8.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/amd64/amd64/powernow-k8.c b/sys/arch/amd64/amd64/powernow-k8.c index 0183c14c933..2f80234c00d 100644 --- a/sys/arch/amd64/amd64/powernow-k8.c +++ b/sys/arch/amd64/amd64/powernow-k8.c @@ -1,4 +1,4 @@ -/* $OpenBSD: powernow-k8.c,v 1.27 2017/12/09 16:39:54 fcambus Exp $ */ +/* $OpenBSD: powernow-k8.c,v 1.28 2018/01/14 00:33:09 bluhm Exp $ */ /* * Copyright (c) 2004 Martin Végiard. * Copyright (c) 2004-2005 Bruno Ducrot @@ -231,7 +231,7 @@ k8pnow_transition(struct k8pnow_cpu_state *cstate, int level) /* Phase 2: change to requested core frequency */ if (cfid != fid) { - u_int vco_fid, vco_cfid; + int vco_fid, vco_cfid; vco_fid = FID_TO_VCO_FID(fid); vco_cfid = FID_TO_VCO_FID(cfid); |