Commit 5871100d authored by Ulrich Sibiller's avatar Ulrich Sibiller

NXpicture.c: remove unneccessary check

Code can only be reached if pPicture is non-NULL. Besides, pPicture will be accessed later anyway, regardless of this check. Finding of PVS Studio: "V547 Expression 'pPicture != NULL' is always true."
parent 41bf8397
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment