aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2020-08-03 16:38:19 +0200
committerUlrich Sibiller <uli42@gmx.de>2021-01-15 19:50:35 +0100
commit28fef3bc06e9325202920fc21f42d2506e8f2b2e (patch)
tree41a9a2027a05c0be3344351bc44c934e936f8da6
parent36d7e152f1bb977517d0c6f764781d287cf01c26 (diff)
downloadnx-libs-28fef3bc06e9325202920fc21f42d2506e8f2b2e.tar.gz
nx-libs-28fef3bc06e9325202920fc21f42d2506e8f2b2e.tar.bz2
nx-libs-28fef3bc06e9325202920fc21f42d2506e8f2b2e.zip
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."
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Colormap.c2
1 files changed, 1 insertions, 1 deletions
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