aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-01-16 00:24:10 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-01-16 00:24:10 +0100
commit8c3bb27150bf058c007af1318cb477e9763b9d9d (patch)
tree794b78e31d0ffdff0a41ecec3869afee542410ba /nx-X11/programs/Xserver/hw/nxagent/NXpicture.c
parentb66699555d2e2503926f01a9c192481e01812399 (diff)
parent1b80750f69a848c1c00c15c537707acca4e68684 (diff)
downloadnx-libs-8c3bb27150bf058c007af1318cb477e9763b9d9d.tar.gz
nx-libs-8c3bb27150bf058c007af1318cb477e9763b9d9d.tar.bz2
nx-libs-8c3bb27150bf058c007af1318cb477e9763b9d9d.zip
Merge branch 'uli42-pr/pvs_findings' into 3.6.x
Attributes GH PR #981: https://github.com/ArcticaProject/nx-libs/pull/981
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/NXpicture.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXpicture.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c b/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c
index 2a307b0f7..5bda3c9ef 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c
@@ -320,27 +320,24 @@ static PicturePtr createSourcePicture(void)
if (!pPicture)
return 0;
- if (pPicture != NULL)
- {
- DevUnion *ppriv = (DevUnion *) (pPicture + 1);
+ DevUnion *ppriv = (DevUnion *) (pPicture + 1);
- for (int i = 0; i < picturePrivateCount; ++i)
- {
- /*
- * Other privates are inaccessible.
- */
+ for (int i = 0; i < picturePrivateCount; ++i)
+ {
+ /*
+ * Other privates are inaccessible.
+ */
- ppriv[i].ptr = NULL;
- }
+ ppriv[i].ptr = NULL;
+ }
- char *privPictureRecAddr = (char *) &ppriv[picturePrivateCount];
+ char *privPictureRecAddr = (char *) &ppriv[picturePrivateCount];
- ppriv[nxagentPicturePrivateIndex].ptr = (void *) privPictureRecAddr;
+ ppriv[nxagentPicturePrivateIndex].ptr = (void *) privPictureRecAddr;
- pPicture -> devPrivates = ppriv;
+ pPicture -> devPrivates = ppriv;
- nxagentPicturePriv(pPicture) -> picture = 0;
- }
+ nxagentPicturePriv(pPicture) -> picture = 0;
pPicture->pDrawable = 0;
pPicture->pFormat = 0;