From 7287ef9e6cf953066e4a092cca9d0e4a279172bf Mon Sep 17 00:00:00 2001 From: Mikhail Gusarov Date: Sun, 6 Jun 2010 21:18:40 +0700 Subject: Remove unnecessary parentheses around return values in functions This patch was generated by the following Perl code: perl -i -pe 's/([^_])return\s*\(\s*([^(]+?)\s*\)s*;(\s+(\n))?/$1return $2;$4/g;' Signed-off-by: Mikhail Gusarov Reviewed-by: Jamey Sharp Reviewed-by: Daniel Stone Signed-off-by: Keith Packard --- dbe/dbe.c | 60 ++++++++++++++++++++++++++++++------------------------------ 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'dbe/dbe.c') diff --git a/dbe/dbe.c b/dbe/dbe.c index b4b746678..77b616b6a 100644 --- a/dbe/dbe.c +++ b/dbe/dbe.c @@ -199,7 +199,7 @@ ProcDbeAllocateBackBufferName(ClientPtr client) /* The window must be InputOutput. */ if (pWin->drawable.class != InputOutput) { - return(BadMatch); + return BadMatch; } /* The swap action must be valid. */ @@ -209,7 +209,7 @@ ProcDbeAllocateBackBufferName(ClientPtr client) (swapAction != XdbeUntouched ) && (swapAction != XdbeCopied )) { - return(BadValue); + return BadValue; } /* The id must be in range and not already in use. */ @@ -220,12 +220,12 @@ ProcDbeAllocateBackBufferName(ClientPtr client) */ pDbeScreenPriv = DBE_SCREEN_PRIV_FROM_WINDOW(pWin); if (!pDbeScreenPriv->GetVisualInfo) - return(BadMatch); /* screen doesn't support double buffering */ + return BadMatch; /* screen doesn't support double buffering */ if (!(*pDbeScreenPriv->GetVisualInfo)(pWin->drawable.pScreen, &scrVisInfo)) { /* GetVisualInfo() failed to allocate visual info data. */ - return(BadAlloc); + return BadAlloc; } /* See if the window's visual is on the list. */ @@ -243,7 +243,7 @@ ProcDbeAllocateBackBufferName(ClientPtr client) if (!visualMatched) { - return(BadMatch); + return BadMatch; } if ((pDbeWindowPriv = DBE_WINDOW_PRIV(pWin)) == NULL) @@ -254,7 +254,7 @@ ProcDbeAllocateBackBufferName(ClientPtr client) pDbeWindowPriv = dixAllocateObjectWithPrivates(DbeWindowPrivRec, PRIVATE_DBE_WINDOW); if (!pDbeWindowPriv) - return(BadAlloc); + return BadAlloc; /* Fill out window priv information. */ pDbeWindowPriv->pWindow = pWin; @@ -321,7 +321,7 @@ ProcDbeAllocateBackBufferName(ClientPtr client) (pDbeWindowPriv->maxAvailableIDs+DBE_INCR_MAX_IDS)*sizeof(XID)); if (!pDbeWindowPriv->IDs) { - return(BadAlloc); + return BadAlloc; } memset(&pDbeWindowPriv->IDs[pDbeWindowPriv->nBufferIDs], 0, (pDbeWindowPriv->maxAvailableIDs + DBE_INCR_MAX_IDS - @@ -377,12 +377,12 @@ ProcDbeAllocateBackBufferName(ClientPtr client) /* Set swap action on all calls. */ pDbeWindowPriv->swapAction = stuff->swapAction; - return(status); + return status; out_free: dixSetPrivate(&pWin->devPrivates, dbeWindowPrivKey, NULL); free(pDbeWindowPriv); - return (status); + return status; } /* ProcDbeAllocateBackBufferName() */ @@ -445,12 +445,12 @@ ProcDbeDeallocateBackBufferName(ClientPtr client) { /* We did not find the ID in the ID list. */ client->errorValue = stuff->buffer; - return(dbeErrorBase + DbeBadBuffer); + return dbeErrorBase + DbeBadBuffer; } FreeResource(stuff->buffer, RT_NONE); - return(Success); + return Success; } /* ProcDbeDeallocateBackBufferName() */ @@ -496,7 +496,7 @@ ProcDbeSwapBuffers(ClientPtr client) if (nStuff == 0) { - return(Success); + return Success; } if (nStuff > UINT32_MAX / sizeof(DbeSwapInfoRec)) @@ -509,7 +509,7 @@ ProcDbeSwapBuffers(ClientPtr client) swapInfo = (DbeSwapInfoPtr)malloc(nStuff * sizeof(DbeSwapInfoRec)); if (swapInfo == NULL) { - return(BadAlloc); + return BadAlloc; } @@ -529,7 +529,7 @@ ProcDbeSwapBuffers(ClientPtr client) if (DBE_WINDOW_PRIV(pWin) == NULL) { free(swapInfo); - return(BadMatch); + return BadMatch; } /* Each window must only be specified once - BadMatch. */ @@ -538,7 +538,7 @@ ProcDbeSwapBuffers(ClientPtr client) if (dbeSwapInfo[i].window == dbeSwapInfo[j].window) { free(swapInfo); - return(BadMatch); + return BadMatch; } } @@ -549,7 +549,7 @@ ProcDbeSwapBuffers(ClientPtr client) (dbeSwapInfo[i].swapAction != XdbeCopied )) { free(swapInfo); - return(BadValue); + return BadValue; } /* Everything checks out OK. Fill in the swap info array. */ @@ -579,12 +579,12 @@ ProcDbeSwapBuffers(ClientPtr client) if (error != Success) { free(swapInfo); - return(error); + return error; } } free(swapInfo); - return(Success); + return Success; } /* ProcDbeSwapBuffers() */ @@ -626,7 +626,7 @@ ProcDbeBeginIdiom(ClientPtr client) } } - return(Success); + return Success; } /* ProcDbeBeginIdiom() */ @@ -673,7 +673,7 @@ ProcDbeGetVisualInfo(ClientPtr client) if (!(pDrawables = (DrawablePtr *)malloc(stuff->n * sizeof(DrawablePtr)))) { - return(BadAlloc); + return BadAlloc; } drawables = (Drawable *)&stuff[1]; @@ -695,7 +695,7 @@ ProcDbeGetVisualInfo(ClientPtr client) { free(pDrawables); - return(BadAlloc); + return BadAlloc; } length = 0; @@ -894,7 +894,7 @@ ProcDbeDispatch(ClientPtr client) return(ProcDbeBeginIdiom(client)); case X_DbeEndIdiom: - return(Success); + return Success; case X_DbeGetVisualInfo: return(ProcDbeGetVisualInfo(client)); @@ -903,7 +903,7 @@ ProcDbeDispatch(ClientPtr client) return(ProcDbeGetBackBufferAttributes(client)); default: - return(BadRequest); + return BadRequest; } } /* ProcDbeDispatch() */ @@ -1195,7 +1195,7 @@ SProcDbeDispatch(ClientPtr client) return(SProcDbeBeginIdiom(client)); case X_DbeEndIdiom: - return(Success); + return Success; case X_DbeGetVisualInfo: return(SProcDbeGetVisualInfo(client)); @@ -1204,7 +1204,7 @@ SProcDbeDispatch(ClientPtr client) return(SProcDbeGetBackBufferAttributes(client)); default: - return (BadRequest); + return BadRequest; } } /* SProcDbeDispatch() */ @@ -1269,7 +1269,7 @@ DbeSetupBackgroundPainter(WindowPtr pWin, GCPtr pGC) default: /* pWin->backgroundState == None */ - return(FALSE); + return FALSE; } return ChangeGC(NullClient, pGC, gcmask, gcvalues) == 0; @@ -1295,7 +1295,7 @@ DbeSetupBackgroundPainter(WindowPtr pWin, GCPtr pGC) static int DbeDrawableDelete(pointer pDrawable, XID id) { - return(Success); + return Success; } /* DbeDrawableDelete() */ @@ -1335,7 +1335,7 @@ DbeWindowPrivDelete(pointer pDbeWinPriv, XID id) if (i == pDbeWindowPriv->nBufferIDs) { /* We did not find the ID in the array. We should never get here. */ - return(BadValue); + return BadValue; } /* Remove the ID from the array. */ @@ -1402,7 +1402,7 @@ DbeWindowPrivDelete(pointer pDbeWinPriv, XID id) dixFreeObjectWithPrivates(pDbeWindowPriv, PRIVATE_DBE_WINDOW); } - return(Success); + return Success; } /* DbeWindowPrivDelete() */ @@ -1523,7 +1523,7 @@ DbeDestroyWindow(WindowPtr pWin) ************************************************************************** */ - return(ret); + return ret; } /* DbeDestroyWindow() */ -- cgit v1.2.3