From b74a056a5cd9c84b02ff6d4ae92f895bbdbfbd51 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Mon, 2 Aug 2010 20:55:50 +0000 Subject: Make MHZ_TO_PLL safer to use by adding parenthesis. Fixes a potential issue in agten(4) uncovered by gcc4. ok miod@, deraadt@ --- sys/dev/ic/ibm525reg.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sys') diff --git a/sys/dev/ic/ibm525reg.h b/sys/dev/ic/ibm525reg.h index a602128093a..fca2fff436a 100644 --- a/sys/dev/ic/ibm525reg.h +++ b/sys/dev/ic/ibm525reg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ibm525reg.h,v 1.1 2005/07/19 09:34:14 miod Exp $ */ +/* $OpenBSD: ibm525reg.h,v 1.2 2010/08/02 20:55:49 kettenis Exp $ */ /* * Copyright (c) 2005, Miodrag Vallat. * @@ -176,7 +176,7 @@ * Pixel clock encoding */ #define MHZ_TO_PLL(m) \ - (m) < 32 ? 0x00 | (4 * (m) - 65) : \ - (m) < 64 ? 0x40 | (2 * (m) - 65) : \ - (m) < 128 ? 0x80 | ((m) - 65) : \ - 0xc0 | ((m) / 2 - 65) + ((m) < 32 ? 0x00 | (4 * (m) - 65) : \ + (m) < 64 ? 0x40 | (2 * (m) - 65) : \ + (m) < 128 ? 0x80 | ((m) - 65) : \ + 0xc0 | ((m) / 2 - 65)) -- cgit v1.2.3