From 28fef3bc06e9325202920fc21f42d2506e8f2b2e Mon Sep 17 00:00:00 2001
From: Ulrich Sibiller <uli42@gmx.de>
Date: Mon, 3 Aug 2020 16:38:19 +0200
Subject: Colormap.c: fix parentheses

PVS Studio: "V592 The expression was enclosed by parentheses twice:
'((* pRed * (limg + 1)))'. One pair of parentheses is unnecessary or
misprint is present."
---
 nx-X11/programs/Xserver/hw/nxagent/Colormap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'nx-X11')

diff --git a/nx-X11/programs/Xserver/hw/nxagent/Colormap.c b/nx-X11/programs/Xserver/hw/nxagent/Colormap.c
index 9308390fe..099c76af4 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Colormap.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Colormap.c
@@ -482,7 +482,7 @@ void nxagentResolveColor(unsigned short *pRed, unsigned short *pGreen,
     unsigned int limg = pVisual->ColormapEntries - 1;
     /* rescale to gray then [0..limg] then [0..65535] then rgb bits */
     *pRed = (30L * *pRed + 59L * *pGreen + 11L * *pBlue) / 100;
-    *pRed = ((((*pRed * (limg + 1))) >> 16) * 65535) / limg;
+    *pRed = (((*pRed * (limg + 1)) >> 16) * 65535) / limg;
     *pBlue = *pGreen = *pRed = ((*pRed >> shift) * 65535) / lim;
   }
   else
-- 
cgit v1.2.3