[PATCH 2/2] Remove unnecessary parentheses around return values in functions
Mikhail Gusarov
dottedmag at dottedmag.net
Sun Jun 6 07:18:40 PDT 2010
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 <dottedmag at dottedmag.net>
---
Xext/panoramiX.c | 2 +-
Xext/panoramiXprocs.c | 110 +++++++++++-----------
Xext/security.c | 2 +-
Xext/shape.c | 8 +-
Xext/shm.c | 22 +++---
Xext/xf86bigfont.c | 2 +-
Xext/xtest.c | 2 +-
Xext/xvdisp.c | 52 ++++++------
Xext/xvmain.c | 4 +-
Xi/exevents.c | 8 +-
Xi/getprop.c | 2 +-
Xi/listdev.c | 2 +-
Xi/opendev.c | 2 +-
Xi/sendexev.c | 2 +-
Xi/stubs.c | 8 +-
Xi/xiproperty.c | 26 +++---
dbe/dbe.c | 60 ++++++------
dbe/midbe.c | 26 +++---
dix/colormap.c | 136 ++++++++++++++--------------
dix/cursor.c | 4 +-
dix/devices.c | 4 +-
dix/dispatch.c | 106 +++++++++++-----------
dix/dixfonts.c | 4 +-
dix/dixutils.c | 10 +-
dix/events.c | 18 ++--
dix/extension.c | 8 +-
dix/gc.c | 6 +-
dix/main.c | 2 +-
dix/property.c | 32 ++++----
dix/ptrveloc.c | 2 +-
dix/region.c | 8 +-
dix/resource.c | 2 +-
dix/swapreq.c | 2 +-
dix/window.c | 114 ++++++++++++------------
fb/fbcmap.c | 2 +-
fb/fbpixmap.c | 2 +-
fb/fbscreen.c | 4 +-
glx/singlesize.c | 4 +-
hw/dmx/dmx_glxvisuals.c | 8 +-
hw/dmx/dmxcmap.c | 2 +-
hw/dmx/dmxfont.c | 2 +-
hw/dmx/dmxinit.c | 2 +-
hw/dmx/dmxpixmap.c | 2 +-
hw/dmx/glxProxy/compsize.c | 8 +-
hw/dmx/glxProxy/glxcmds.c | 4 +-
hw/dmx/glxProxy/glxfbconfig.c | 6 +-
hw/dmx/glxProxy/glxscreens.c | 14 ++--
hw/dmx/glxProxy/glxsingle.c | 10 +-
hw/dmx/glxProxy/glxvisuals.c | 22 +++---
hw/kdrive/ephyr/hostx.c | 2 +-
hw/kdrive/src/kxv.c | 2 +-
hw/vfb/InitOutput.c | 2 +-
hw/xfree86/common/xf86AutoConfig.c | 2 +-
hw/xfree86/common/xf86Bus.c | 10 +-
hw/xfree86/common/xf86Config.c | 4 +-
hw/xfree86/common/xf86Helper.c | 12 ++--
hw/xfree86/common/xf86Init.c | 2 +-
hw/xfree86/common/xf86Option.c | 2 +-
hw/xfree86/common/xf86Xinput.c | 6 +-
hw/xfree86/common/xf86pciBus.c | 2 +-
hw/xfree86/common/xf86sbusBus.c | 2 +-
hw/xfree86/common/xf86xv.c | 2 +-
hw/xfree86/common/xisb.c | 14 ++--
hw/xfree86/ddc/ddc.c | 16 ++--
hw/xfree86/ddc/interpret_edid.c | 2 +-
hw/xfree86/dixmods/extmod/xf86dga2.c | 18 ++--
hw/xfree86/dixmods/extmod/xf86vmode.c | 2 +-
hw/xfree86/dri2/dri2.c | 2 +-
hw/xfree86/loader/loadext.c | 8 +-
hw/xfree86/loader/loadmod.c | 6 +-
hw/xfree86/modes/xf86Crtc.c | 6 +-
hw/xfree86/os-support/bsd/alpha_video.c | 10 +-
hw/xfree86/os-support/bsd/arm_video.c | 12 ++--
hw/xfree86/os-support/bsd/bsd_VTsw.c | 16 ++--
hw/xfree86/os-support/bsd/bsd_init.c | 10 +-
hw/xfree86/os-support/bsd/i386_video.c | 10 +-
hw/xfree86/os-support/bsd/sparc64_video.c | 2 +-
hw/xfree86/os-support/linux/lnx_agp.c | 2 +-
hw/xfree86/os-support/linux/lnx_init.c | 12 ++--
hw/xfree86/os-support/sco/VTsw_sco.c | 12 ++--
hw/xfree86/os-support/sco/sco_init.c | 16 ++--
hw/xfree86/os-support/shared/VTsw_noop.c | 8 +-
hw/xfree86/os-support/shared/VTsw_usl.c | 14 ++--
hw/xfree86/os-support/shared/bios_devmem.c | 8 +-
hw/xfree86/os-support/shared/bios_mmap.c | 12 ++--
hw/xfree86/os-support/shared/posix_tty.c | 46 +++++-----
hw/xfree86/os-support/solaris/sun_VTsw.c | 20 ++--
hw/xfree86/os-support/solaris/sun_agp.c | 2 +-
hw/xfree86/os-support/sysv/sysv_init.c | 10 +-
hw/xfree86/os-support/sysv/sysv_video.c | 4 +-
hw/xfree86/parser/Configint.h | 4 +-
hw/xfree86/parser/Device.c | 4 +-
hw/xfree86/parser/Flags.c | 18 ++--
hw/xfree86/parser/Input.c | 12 ++--
hw/xfree86/parser/Layout.c | 10 +-
hw/xfree86/parser/Monitor.c | 20 ++--
hw/xfree86/parser/Screen.c | 12 ++--
hw/xfree86/parser/Video.c | 4 +-
hw/xfree86/parser/read.c | 12 ++--
hw/xfree86/parser/scan.c | 44 +++++-----
hw/xfree86/ramdac/IBM.c | 8 +-
hw/xfree86/ramdac/TI.c | 2 +-
hw/xfree86/ramdac/xf86RamDac.c | 2 +-
hw/xfree86/utils/gtf/gtf.c | 6 +-
hw/xfree86/vbe/vbe.c | 50 +++++-----
hw/xfree86/vgahw/vgaCmap.c | 4 +-
hw/xfree86/vgahw/vgaHW.c | 4 +-
hw/xfree86/xaa/xaaFillRect.c | 2 +-
hw/xfree86/xaa/xaaNonTEText.c | 4 +-
hw/xnest/Events.c | 2 +-
hw/xnest/GCOps.c | 4 +-
hw/xnest/Pixmap.c | 2 +-
hw/xquartz/darwinXinput.c | 8 +-
hw/xquartz/mach-startup/bundle-main.c | 2 +-
hw/xquartz/xpr/dri.c | 2 +-
hw/xwin/winconfig.c | 6 +-
include/dix.h | 4 +-
mi/miarc.c | 4 +-
mi/mibitblt.c | 2 +-
mi/micmap.c | 2 +-
mi/mifpolycon.c | 2 +-
mi/mioverlay.c | 2 +-
mi/mipolycon.c | 10 +-
mi/mipolygen.c | 8 +-
mi/mipolyutil.c | 2 +-
mi/mivaltree.c | 2 +-
mi/miwideline.c | 4 +-
miext/rootless/rootlessGC.c | 2 +-
os/access.c | 28 +++---
os/connection.c | 2 +-
os/io.c | 12 ++--
os/strcasecmp.c | 2 +-
os/strcasestr.c | 2 +-
os/strlcpy.c | 2 +-
os/utils.c | 14 ++--
os/xdmcp.c | 22 +++---
randr/rrproperty.c | 28 +++---
render/render.c | 30 +++---
xfixes/cursor.c | 4 +-
xfixes/region.c | 2 +-
xfixes/saveset.c | 6 +-
xfixes/select.c | 2 +-
xkb/xkbAccessX.c | 2 +-
xkb/xkbLEDs.c | 2 +-
xkb/xkbfmisc.c | 2 +-
145 files changed, 847 insertions(+), 847 deletions(-)
diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c
index 27ca01f..b73c53f 100644
--- a/Xext/panoramiX.c
+++ b/Xext/panoramiX.c
@@ -339,7 +339,7 @@ XineramaFindIDByScrnum(pointer resource, XID id, pointer privdata)
PanoramiXRes *res = (PanoramiXRes*)resource;
PanoramiXSearchData *data = (PanoramiXSearchData*)privdata;
- return (res->info[data->screen].id == data->id);
+ return res->info[data->screen].id == data->id;
}
PanoramiXRes *
diff --git a/Xext/panoramiXprocs.c b/Xext/panoramiXprocs.c
index aac417c..b744e4d 100644
--- a/Xext/panoramiXprocs.c
+++ b/Xext/panoramiXprocs.c
@@ -155,7 +155,7 @@ int PanoramiXCreateWindow(ClientPtr client)
else
free(newWin);
- return (result);
+ return result;
}
@@ -227,7 +227,7 @@ int PanoramiXChangeWindowAttributes(ClientPtr client)
result = (*SavedProcVector[X_ChangeWindowAttributes])(client);
}
- return (result);
+ return result;
}
@@ -253,7 +253,7 @@ int PanoramiXDestroyWindow(ClientPtr client)
/* Since ProcDestroyWindow is using FreeResource, it will free
our resource for us on the last pass through the loop above */
- return (result);
+ return result;
}
@@ -279,7 +279,7 @@ int PanoramiXDestroySubwindows(ClientPtr client)
/* DestroySubwindows is using FreeResource which will free
our resources for us on the last pass through the loop above */
- return (result);
+ return result;
}
@@ -302,7 +302,7 @@ int PanoramiXChangeSaveSet(ClientPtr client)
if(result != Success) break;
}
- return (result);
+ return result;
}
@@ -341,7 +341,7 @@ int PanoramiXReparentWindow(ClientPtr client)
if(result != Success) break;
}
- return (result);
+ return result;
}
@@ -364,7 +364,7 @@ int PanoramiXMapWindow(ClientPtr client)
if(result != Success) break;
}
- return (result);
+ return result;
}
@@ -387,7 +387,7 @@ int PanoramiXMapSubwindows(ClientPtr client)
if(result != Success) break;
}
- return (result);
+ return result;
}
@@ -410,7 +410,7 @@ int PanoramiXUnmapWindow(ClientPtr client)
if(result != Success) break;
}
- return (result);
+ return result;
}
@@ -433,7 +433,7 @@ int PanoramiXUnmapSubwindows(ClientPtr client)
if(result != Success) break;
}
- return (result);
+ return result;
}
@@ -502,7 +502,7 @@ int PanoramiXConfigureWindow(ClientPtr client)
if(result != Success) break;
}
- return (result);
+ return result;
}
@@ -525,7 +525,7 @@ int PanoramiXCirculateWindow(ClientPtr client)
if(result != Success) break;
}
- return (result);
+ return result;
}
@@ -679,7 +679,7 @@ int PanoramiXCreatePixmap(ClientPtr client)
else
free(newPix);
- return (result);
+ return result;
}
@@ -707,7 +707,7 @@ int PanoramiXFreePixmap(ClientPtr client)
/* Since ProcFreePixmap is using FreeResource, it will free
our resource for us on the last pass through the loop above */
- return (result);
+ return result;
}
@@ -789,7 +789,7 @@ int PanoramiXCreateGC(ClientPtr client)
else
free(newGC);
- return (result);
+ return result;
}
int PanoramiXChangeGC(ClientPtr client)
@@ -855,7 +855,7 @@ int PanoramiXChangeGC(ClientPtr client)
if(result != Success) break;
}
- return (result);
+ return result;
}
@@ -884,7 +884,7 @@ int PanoramiXCopyGC(ClientPtr client)
if(result != Success) break;
}
- return (result);
+ return result;
}
@@ -907,7 +907,7 @@ int PanoramiXSetDashes(ClientPtr client)
if(result != Success) break;
}
- return (result);
+ return result;
}
@@ -930,7 +930,7 @@ int PanoramiXSetClipRectangles(ClientPtr client)
if(result != Success) break;
}
- return (result);
+ return result;
}
@@ -956,7 +956,7 @@ int PanoramiXFreeGC(ClientPtr client)
/* Since ProcFreeGC is using FreeResource, it will free
our resource for us on the last pass through the loop above */
- return (result);
+ return result;
}
@@ -987,7 +987,7 @@ int PanoramiXClearToBackground(ClientPtr client)
if(result != Success) break;
}
- return (result);
+ return result;
}
@@ -1069,7 +1069,7 @@ int PanoramiXCopyArea(ClientPtr client)
if(drawables[0]->depth != pDst->depth) {
client->errorValue = stuff->dstDrawable;
free(data);
- return (BadMatch);
+ return BadMatch;
}
(*pGC->ops->PutImage) (pDst, pGC, pDst->depth, dstx, dsty,
@@ -1112,7 +1112,7 @@ int PanoramiXCopyArea(ClientPtr client)
if ((pDst->pScreen != pSrc->pScreen) ||
(pDst->depth != pSrc->depth)) {
client->errorValue = stuff->dstDrawable;
- return (BadMatch);
+ return BadMatch;
}
} else
pSrc = pDst;
@@ -1215,7 +1215,7 @@ int PanoramiXCopyPlane(ClientPtr client)
if (pdstDraw->pScreen != psrcDraw->pScreen) {
client->errorValue = stuff->dstDrawable;
- return (BadMatch);
+ return BadMatch;
}
} else
psrcDraw = pdstDraw;
@@ -1223,7 +1223,7 @@ int PanoramiXCopyPlane(ClientPtr client)
if(stuff->bitPlane == 0 || (stuff->bitPlane & (stuff->bitPlane - 1)) ||
(stuff->bitPlane > (1L << (psrcDraw->depth - 1)))) {
client->errorValue = stuff->bitPlane;
- return(BadValue);
+ return BadValue;
}
pRgn = (*pGC->ops->CopyPlane)(psrcDraw, pdstDraw, pGC,
@@ -1305,7 +1305,7 @@ int PanoramiXPolyPoint(ClientPtr client)
if(result != Success) break;
}
free(origPts);
- return (result);
+ return result;
} else
return Success;
}
@@ -1365,7 +1365,7 @@ int PanoramiXPolyLine(ClientPtr client)
if(result != Success) break;
}
free(origPts);
- return (result);
+ return result;
} else
return Success;
}
@@ -1428,7 +1428,7 @@ int PanoramiXPolySegment(ClientPtr client)
if(result != Success) break;
}
free(origSegs);
- return (result);
+ return result;
} else
return Success;
}
@@ -1490,7 +1490,7 @@ int PanoramiXPolyRectangle(ClientPtr client)
if(result != Success) break;
}
free(origRecs);
- return (result);
+ return result;
} else
return Success;
}
@@ -1550,7 +1550,7 @@ int PanoramiXPolyArc(ClientPtr client)
if(result != Success) break;
}
free(origArcs);
- return (result);
+ return result;
} else
return Success;
}
@@ -1611,7 +1611,7 @@ int PanoramiXFillPoly(ClientPtr client)
if(result != Success) break;
}
free(locPts);
- return (result);
+ return result;
} else
return Success;
}
@@ -1672,7 +1672,7 @@ int PanoramiXPolyFillRectangle(ClientPtr client)
if(result != Success) break;
}
free(origRects);
- return (result);
+ return result;
} else
return Success;
}
@@ -1733,7 +1733,7 @@ int PanoramiXPolyFillArc(ClientPtr client)
if(result != Success) break;
}
free(origArcs);
- return (result);
+ return result;
} else
return Success;
}
@@ -1775,7 +1775,7 @@ int PanoramiXPutImage(ClientPtr client)
result = (* SavedProcVector[X_PutImage])(client);
if(result != Success) break;
}
- return (result);
+ return result;
}
@@ -1798,7 +1798,7 @@ int PanoramiXGetImage(ClientPtr client)
if ((stuff->format != XYPixmap) && (stuff->format != ZPixmap)) {
client->errorValue = stuff->format;
- return(BadValue);
+ return BadValue;
}
rc = dixLookupResourceByClass((pointer *)&draw, stuff->drawable,
@@ -1815,7 +1815,7 @@ int PanoramiXGetImage(ClientPtr client)
return rc;
if(!((WindowPtr)pDraw)->realized)
- return(BadMatch);
+ return BadMatch;
x = stuff->x;
y = stuff->y;
@@ -1830,7 +1830,7 @@ int PanoramiXGetImage(ClientPtr client)
if( /* check for being onscreen */
x < 0 || x + w > PanoramiXPixWidth ||
y < 0 || y + h > PanoramiXPixHeight )
- return(BadMatch);
+ return BadMatch;
} else {
if( /* check for being onscreen */
screenInfo.screens[0]->x + pDraw->x + x < 0 ||
@@ -1842,7 +1842,7 @@ int PanoramiXGetImage(ClientPtr client)
x + w > wBorderWidth((WindowPtr)pDraw) + (int)pDraw->width ||
y < -wBorderWidth((WindowPtr)pDraw) ||
y + h > wBorderWidth ((WindowPtr)pDraw) + (int)pDraw->height)
- return(BadMatch);
+ return BadMatch;
}
drawables[0] = pDraw;
@@ -1884,7 +1884,7 @@ int PanoramiXGetImage(ClientPtr client)
}
length = linesPerBuf * widthBytesLine;
if(!(pBuf = malloc(length)))
- return (BadAlloc);
+ return BadAlloc;
WriteReplyToClient(client, sizeof (xGetImageReply), &xgi);
@@ -1976,7 +1976,7 @@ PanoramiXPolyText8(ClientPtr client)
result = (*SavedProcVector[X_PolyText8])(client);
if(result != Success) break;
}
- return (result);
+ return result;
}
int
@@ -2017,7 +2017,7 @@ PanoramiXPolyText16(ClientPtr client)
result = (*SavedProcVector[X_PolyText16])(client);
if(result != Success) break;
}
- return (result);
+ return result;
}
@@ -2058,7 +2058,7 @@ int PanoramiXImageText8(ClientPtr client)
result = (*SavedProcVector[X_ImageText8])(client);
if(result != Success) break;
}
- return (result);
+ return result;
}
@@ -2099,7 +2099,7 @@ int PanoramiXImageText16(ClientPtr client)
result = (*SavedProcVector[X_ImageText16])(client);
if(result != Success) break;
}
- return (result);
+ return result;
}
@@ -2139,7 +2139,7 @@ int PanoramiXCreateColormap(ClientPtr client)
else
free(newCmap);
- return (result);
+ return result;
}
@@ -2167,7 +2167,7 @@ int PanoramiXFreeColormap(ClientPtr client)
/* Since ProcFreeColormap is using FreeResource, it will free
our resource for us on the last pass through the loop above */
- return (result);
+ return result;
}
@@ -2208,7 +2208,7 @@ PanoramiXCopyColormapAndFree(ClientPtr client)
else
free(newCmap);
- return (result);
+ return result;
}
@@ -2232,7 +2232,7 @@ int PanoramiXInstallColormap(ClientPtr client)
result = (* SavedProcVector[X_InstallColormap])(client);
if(result != Success) break;
}
- return (result);
+ return result;
}
@@ -2256,7 +2256,7 @@ int PanoramiXUninstallColormap(ClientPtr client)
result = (* SavedProcVector[X_UninstallColormap])(client);
if(result != Success) break;
}
- return (result);
+ return result;
}
@@ -2280,7 +2280,7 @@ int PanoramiXAllocColor(ClientPtr client)
result = (* SavedProcVector[X_AllocColor])(client);
if(result != Success) break;
}
- return (result);
+ return result;
}
@@ -2304,7 +2304,7 @@ int PanoramiXAllocNamedColor(ClientPtr client)
result = (* SavedProcVector[X_AllocNamedColor])(client);
if(result != Success) break;
}
- return (result);
+ return result;
}
@@ -2328,7 +2328,7 @@ int PanoramiXAllocColorCells(ClientPtr client)
result = (* SavedProcVector[X_AllocColorCells])(client);
if(result != Success) break;
}
- return (result);
+ return result;
}
@@ -2352,7 +2352,7 @@ int PanoramiXAllocColorPlanes(ClientPtr client)
result = (* SavedProcVector[X_AllocColorPlanes])(client);
if(result != Success) break;
}
- return (result);
+ return result;
}
@@ -2376,7 +2376,7 @@ int PanoramiXFreeColors(ClientPtr client)
stuff->cmap = cmap->info[j].id;
result = (* SavedProcVector[X_FreeColors])(client);
}
- return (result);
+ return result;
}
@@ -2400,7 +2400,7 @@ int PanoramiXStoreColors(ClientPtr client)
result = (* SavedProcVector[X_StoreColors])(client);
if(result != Success) break;
}
- return (result);
+ return result;
}
@@ -2424,5 +2424,5 @@ int PanoramiXStoreNamedColor(ClientPtr client)
result = (* SavedProcVector[X_StoreNamedColor])(client);
if(result != Success) break;
}
- return (result);
+ return result;
}
diff --git a/Xext/security.c b/Xext/security.c
index 9ef6d19..b37339f 100644
--- a/Xext/security.c
+++ b/Xext/security.c
@@ -242,7 +242,7 @@ SecurityDeleteAuthorizationEventClient(
else
pAuth->eventClients = pEventClient->next;
free(pEventClient);
- return(Success);
+ return Success;
}
prev = pEventClient;
}
diff --git a/Xext/shape.c b/Xext/shape.c
index 33c0cb3..ac95328 100644
--- a/Xext/shape.c
+++ b/Xext/shape.c
@@ -363,7 +363,7 @@ ProcPanoramiXShapeRectangles(
result = ProcShapeRectangles (client);
if (result != Success) break;
}
- return (result);
+ return result;
}
#endif
@@ -472,7 +472,7 @@ ProcPanoramiXShapeMask(
result = ProcShapeMask (client);
if (result != Success) break;
}
- return (result);
+ return result;
}
#endif
@@ -596,7 +596,7 @@ ProcPanoramiXShapeCombine(
result = ProcShapeCombine (client);
if (result != Success) break;
}
- return (result);
+ return result;
}
#endif
@@ -662,7 +662,7 @@ ProcPanoramiXShapeOffset(
result = ProcShapeOffset (client);
if(result != Success) break;
}
- return (result);
+ return result;
}
#endif
diff --git a/Xext/shm.c b/Xext/shm.c
index dfd8723..3230d83 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -213,7 +213,7 @@ static Bool CheckForShmSyscall(void)
badSysCall = TRUE;
}
signal(SIGSYS, oldHandler);
- return(!badSysCall);
+ return !badSysCall;
}
#define MUST_CHECK_FOR_SHM_SYSCALL
@@ -456,7 +456,7 @@ ProcShmAttach(ClientPtr client)
if ((stuff->readOnly != xTrue) && (stuff->readOnly != xFalse))
{
client->errorValue = stuff->readOnly;
- return(BadValue);
+ return BadValue;
}
for (shmdesc = Shmsegs;
shmdesc && (shmdesc->shmid != stuff->shmid);
@@ -619,7 +619,7 @@ ProcPanoramiXShmPutImage(ClientPtr client)
result = ProcShmPutImage(client);
if(result != Success) break;
}
- return(result);
+ return result;
}
static int
@@ -641,7 +641,7 @@ ProcPanoramiXShmGetImage(ClientPtr client)
if ((stuff->format != XYPixmap) && (stuff->format != ZPixmap)) {
client->errorValue = stuff->format;
- return(BadValue);
+ return BadValue;
}
rc = dixLookupResourceByClass((pointer *)&draw, stuff->drawable,
@@ -672,7 +672,7 @@ ProcPanoramiXShmGetImage(ClientPtr client)
if( /* check for being onscreen */
x < 0 || x + w > PanoramiXPixWidth ||
y < 0 || y + h > PanoramiXPixHeight )
- return(BadMatch);
+ return BadMatch;
} else {
if( /* check for being onscreen */
screenInfo.screens[0]->x + pDraw->x + x < 0 ||
@@ -684,12 +684,12 @@ ProcPanoramiXShmGetImage(ClientPtr client)
x + w > wBorderWidth((WindowPtr)pDraw) + (int)pDraw->width ||
y < -wBorderWidth((WindowPtr)pDraw) ||
y + h > wBorderWidth ((WindowPtr)pDraw) + (int)pDraw->height)
- return(BadMatch);
+ return BadMatch;
}
drawables = calloc(PanoramiXNumScreens, sizeof(DrawablePtr));
if(!drawables)
- return(BadAlloc);
+ return BadAlloc;
drawables[0] = pDraw;
for(i = 1; i < PanoramiXNumScreens; i++) {
@@ -987,7 +987,7 @@ ProcShmGetImage(ClientPtr client)
if ((stuff->format != XYPixmap) && (stuff->format != ZPixmap))
{
client->errorValue = stuff->format;
- return(BadValue);
+ return BadValue;
}
rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0,
DixReadAccess);
@@ -1011,7 +1011,7 @@ ProcShmGetImage(ClientPtr client)
stuff->y + (int)stuff->height >
wBorderWidth((WindowPtr)pDraw) + (int)pDraw->height
)
- return(BadMatch);
+ return BadMatch;
xgi.visual = wVisual(((WindowPtr)pDraw));
}
else
@@ -1021,7 +1021,7 @@ ProcShmGetImage(ClientPtr client)
stuff->y < 0 ||
stuff->y+(int)stuff->height > pDraw->height
)
- return(BadMatch);
+ return BadMatch;
xgi.visual = None;
}
xgi.type = X_Reply;
@@ -1181,7 +1181,7 @@ CreatePmap:
}
pDraw->pScreen->DestroyPixmap(pMap);
}
- return (BadAlloc);
+ return BadAlloc;
}
static int
diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c
index 8b3913d..8f0ddd9 100644
--- a/Xext/xf86bigfont.c
+++ b/Xext/xf86bigfont.c
@@ -134,7 +134,7 @@ CheckForShmSyscall(void)
badSysCall = TRUE;
}
signal(SIGSYS, oldHandler);
- return (!badSysCall);
+ return !badSysCall;
}
#define MUST_CHECK_FOR_SHM_SYSCALL
diff --git a/Xext/xtest.c b/Xext/xtest.c
index 0a6b1c5..89427be 100644
--- a/Xext/xtest.c
+++ b/Xext/xtest.c
@@ -472,7 +472,7 @@ ProcXTestGrabControl(ClientPtr client)
if ((stuff->impervious != xTrue) && (stuff->impervious != xFalse))
{
client->errorValue = stuff->impervious;
- return(BadValue);
+ return BadValue;
}
if (stuff->impervious)
MakeClientGrabImpervious(client);
diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c
index c63706d..deddebd 100644
--- a/Xext/xvdisp.c
+++ b/Xext/xvdisp.c
@@ -483,7 +483,7 @@ ProcXvQueryEncodings(ClientPtr client)
if ((status = _AllocatePort(stuff->port, pPort)) != Success)
{
client->errorValue = stuff->port;
- return (status);
+ return status;
}
rep.type = X_Reply;
@@ -540,14 +540,14 @@ ProcXvPutVideo(ClientPtr client)
if ((status = _AllocatePort(stuff->port, pPort)) != Success)
{
client->errorValue = stuff->port;
- return (status);
+ return status;
}
if (!(pPort->pAdaptor->type & XvInputMask) ||
!(pPort->pAdaptor->type & XvVideoMask))
{
client->errorValue = stuff->port;
- return (BadMatch);
+ return BadMatch;
}
status = XvdiMatchPort(pPort, pDraw);
@@ -578,14 +578,14 @@ ProcXvPutStill(ClientPtr client)
if ((status = _AllocatePort(stuff->port, pPort)) != Success)
{
client->errorValue = stuff->port;
- return (status);
+ return status;
}
if (!(pPort->pAdaptor->type & XvInputMask) ||
!(pPort->pAdaptor->type & XvStillMask))
{
client->errorValue = stuff->port;
- return (BadMatch);
+ return BadMatch;
}
status = XvdiMatchPort(pPort, pDraw);
@@ -616,14 +616,14 @@ ProcXvGetVideo(ClientPtr client)
if ((status = _AllocatePort(stuff->port, pPort)) != Success)
{
client->errorValue = stuff->port;
- return (status);
+ return status;
}
if (!(pPort->pAdaptor->type & XvOutputMask) ||
!(pPort->pAdaptor->type & XvVideoMask))
{
client->errorValue = stuff->port;
- return (BadMatch);
+ return BadMatch;
}
status = XvdiMatchPort(pPort, pDraw);
@@ -654,14 +654,14 @@ ProcXvGetStill(ClientPtr client)
if ((status = _AllocatePort(stuff->port, pPort)) != Success)
{
client->errorValue = stuff->port;
- return (status);
+ return status;
}
if (!(pPort->pAdaptor->type & XvOutputMask) ||
!(pPort->pAdaptor->type & XvStillMask))
{
client->errorValue = stuff->port;
- return (BadMatch);
+ return BadMatch;
}
status = XvdiMatchPort(pPort, pDraw);
@@ -703,7 +703,7 @@ ProcXvSelectPortNotify(ClientPtr client)
if ((status = _AllocatePort(stuff->port, pPort)) != Success)
{
client->errorValue = stuff->port;
- return (status);
+ return status;
}
return XvdiSelectPortNotify(client, pPort, stuff->onoff);
@@ -723,7 +723,7 @@ ProcXvGrabPort(ClientPtr client)
if ((status = _AllocatePort(stuff->port, pPort)) != Success)
{
client->errorValue = stuff->port;
- return (status);
+ return status;
}
status = XvdiGrabPort(client, pPort, stuff->time, &result);
@@ -756,7 +756,7 @@ ProcXvUngrabPort(ClientPtr client)
if ((status = _AllocatePort(stuff->port, pPort)) != Success)
{
client->errorValue = stuff->port;
- return (status);
+ return status;
}
return XvdiUngrabPort(client, pPort, stuff->time);
@@ -776,7 +776,7 @@ ProcXvStopVideo(ClientPtr client)
if ((status = _AllocatePort(stuff->port, pPort)) != Success)
{
client->errorValue = stuff->port;
- return (status);
+ return status;
}
rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixWriteAccess);
@@ -799,13 +799,13 @@ ProcXvSetPortAttribute(ClientPtr client)
if ((status = _AllocatePort(stuff->port, pPort)) != Success)
{
client->errorValue = stuff->port;
- return (status);
+ return status;
}
if (!ValidAtom(stuff->attribute))
{
client->errorValue = stuff->attribute;
- return(BadAtom);
+ return BadAtom;
}
status = XvdiSetPortAttribute(client, pPort, stuff->attribute, stuff->value);
@@ -833,13 +833,13 @@ ProcXvGetPortAttribute(ClientPtr client)
if ((status = _AllocatePort(stuff->port, pPort)) != Success)
{
client->errorValue = stuff->port;
- return (status);
+ return status;
}
if (!ValidAtom(stuff->attribute))
{
client->errorValue = stuff->attribute;
- return(BadAtom);
+ return BadAtom;
}
status = XvdiGetPortAttribute(client, pPort, stuff->attribute, &value);
@@ -874,7 +874,7 @@ ProcXvQueryBestSize(ClientPtr client)
if ((status = _AllocatePort(stuff->port, pPort)) != Success)
{
client->errorValue = stuff->port;
- return (status);
+ return status;
}
rep.type = X_Reply;
@@ -911,7 +911,7 @@ ProcXvQueryPortAttributes(ClientPtr client)
if ((status = _AllocatePort(stuff->port, pPort)) != Success)
{
client->errorValue = stuff->port;
- return (status);
+ return status;
}
rep.type = X_Reply;
@@ -967,14 +967,14 @@ ProcXvPutImage(ClientPtr client)
if ((status = _AllocatePort(stuff->port, pPort)) != Success)
{
client->errorValue = stuff->port;
- return (status);
+ return status;
}
if (!(pPort->pAdaptor->type & XvImageMask) ||
!(pPort->pAdaptor->type & XvInputMask))
{
client->errorValue = stuff->port;
- return (BadMatch);
+ return BadMatch;
}
status = XvdiMatchPort(pPort, pDraw);
@@ -1047,14 +1047,14 @@ ProcXvShmPutImage(ClientPtr client)
if ((status = _AllocatePort(stuff->port, pPort)) != Success)
{
client->errorValue = stuff->port;
- return (status);
+ return status;
}
if (!(pPort->pAdaptor->type & XvImageMask) ||
!(pPort->pAdaptor->type & XvInputMask))
{
client->errorValue = stuff->port;
- return (BadMatch);
+ return BadMatch;
}
status = XvdiMatchPort(pPort, pDraw);
@@ -1113,7 +1113,7 @@ static int
ProcXvShmPutImage(ClientPtr client)
{
SendErrorToClient(client, XvReqCode, xv_ShmPutImage, 0, BadImplementation);
- return(BadImplementation);
+ return BadImplementation;
}
#endif
@@ -1267,7 +1267,7 @@ ProcXvDispatch(ClientPtr client)
if (stuff->data > xvNumRequests) {
SendErrorToClient(client, XvReqCode, stuff->data, 0, BadRequest);
- return(BadRequest);
+ return BadRequest;
}
return XvProcVector[stuff->data](client);
@@ -1591,7 +1591,7 @@ SProcXvDispatch(ClientPtr client)
if (stuff->data > xvNumRequests) {
SendErrorToClient(client, XvReqCode, stuff->data, 0, BadRequest);
- return(BadRequest);
+ return BadRequest;
}
return SXvProcVector[stuff->data](client);
diff --git a/Xext/xvmain.c b/Xext/xvmain.c
index 0c34b16..1b80b12 100644
--- a/Xext/xvmain.c
+++ b/Xext/xvmain.c
@@ -634,7 +634,7 @@ XvdiPutVideo(
pPort->time = currentTime;
- return (Success);
+ return Success;
}
@@ -764,7 +764,7 @@ XvdiGetVideo(
pPort->time = currentTime;
- return (Success);
+ return Success;
}
diff --git a/Xi/exevents.c b/Xi/exevents.c
index 56d9bf7..a609c73 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1702,7 +1702,7 @@ InputClientGone(WindowPtr pWin, XID id)
InputClientsPtr other, prev;
if (!wOtherInputMasks(pWin))
- return (Success);
+ return Success;
prev = 0;
for (other = wOtherInputMasks(pWin)->inputClients; other;
other = other->next) {
@@ -1728,7 +1728,7 @@ InputClientGone(WindowPtr pWin, XID id)
free(other);
}
RecalculateDeviceDeliverableEvents(pWin);
- return (Success);
+ return Success;
}
prev = other;
}
@@ -1829,7 +1829,7 @@ ChangeKeyMapping(ClientPtr client,
KeyClassPtr k = dev->key;
if (k == NULL)
- return (BadMatch);
+ return BadMatch;
if (len != (keyCodes * keySymsPerKeyCode))
return BadLength;
@@ -1972,7 +1972,7 @@ MaybeSendDeviceMotionNotifyHint(deviceKeyButtonPointer * pEvents, Mask mask)
pEvents->detail = NotifyNormal;
}
}
- return (0);
+ return 0;
}
void
diff --git a/Xi/getprop.c b/Xi/getprop.c
index 2460459..ba98fc8 100644
--- a/Xi/getprop.c
+++ b/Xi/getprop.c
@@ -164,7 +164,7 @@ XEventClass
*buf++ = (id << 8) | EventInfo[j].type;
}
}
- return (buf);
+ return buf;
}
/***********************************************************************
diff --git a/Xi/listdev.c b/Xi/listdev.c
index db7e540..3b2272b 100644
--- a/Xi/listdev.c
+++ b/Xi/listdev.c
@@ -269,7 +269,7 @@ CopySwapValuatorClass(ClientPtr client, ValuatorClassPtr v, char **buf)
*buf += sizeof(xAxisInfo);
}
}
- return (i);
+ return i;
}
static void
diff --git a/Xi/opendev.c b/Xi/opendev.c
index 3844d25..e4c02d3 100644
--- a/Xi/opendev.c
+++ b/Xi/opendev.c
@@ -154,7 +154,7 @@ ProcXOpenDevice(ClientPtr client)
rep.num_classes = j;
WriteReplyToClient(client, sizeof(xOpenDeviceReply), &rep);
WriteToClient(client, j * sizeof(xInputClassInfo), (char *)evbase);
- return (Success);
+ return Success;
}
/***********************************************************************
diff --git a/Xi/sendexev.c b/Xi/sendexev.c
index bd96d74..16cbd6f 100644
--- a/Xi/sendexev.c
+++ b/Xi/sendexev.c
@@ -97,7 +97,7 @@ SProcXSendExtensionEvent(ClientPtr client)
for (i = 0; i < stuff->num_events; i++, eventP++) {
proc = EventSwapVector[eventP->u.u.type & 0177];
if (proc == NotImplemented) /* no swapping proc; invalid event type? */
- return (BadValue);
+ return BadValue;
(*proc) (eventP, &eventT);
*eventP = eventT;
}
diff --git a/Xi/stubs.c b/Xi/stubs.c
index 04ba976..296a8c4 100644
--- a/Xi/stubs.c
+++ b/Xi/stubs.c
@@ -207,14 +207,14 @@ ChangeDeviceControl(ClientPtr client, DeviceIntPtr dev,
{
switch (control->control) {
case DEVICE_RESOLUTION:
- return (BadMatch);
+ return BadMatch;
case DEVICE_ABS_CALIB:
case DEVICE_ABS_AREA:
- return (BadMatch);
+ return BadMatch;
case DEVICE_CORE:
- return (BadMatch);
+ return BadMatch;
default:
- return (BadMatch);
+ return BadMatch;
}
}
diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c
index c1839aa..b9f53f7 100644
--- a/Xi/xiproperty.c
+++ b/Xi/xiproperty.c
@@ -254,18 +254,18 @@ get_property(ClientPtr client, DeviceIntPtr dev, Atom property, Atom type,
if (!ValidAtom(property))
{
client->errorValue = property;
- return(BadAtom);
+ return BadAtom;
}
if ((delete != xTrue) && (delete != xFalse))
{
client->errorValue = delete;
- return(BadValue);
+ return BadValue;
}
if ((type != AnyPropertyType) && !ValidAtom(type))
{
client->errorValue = type;
- return(BadAtom);
+ return BadAtom;
}
for (prop = dev->properties.properties; prop; prop = prop->next)
@@ -350,12 +350,12 @@ check_change_property(ClientPtr client, Atom property, Atom type, int format,
if (!ValidAtom(property))
{
client->errorValue = property;
- return(BadAtom);
+ return BadAtom;
}
if (!ValidAtom(type))
{
client->errorValue = type;
- return(BadAtom);
+ return BadAtom;
}
return Success;
@@ -683,7 +683,7 @@ XIDeleteDeviceProperty (DeviceIntPtr device, Atom property, Bool fromClient)
if (handler->DeleteProperty)
rc = handler->DeleteProperty(device, prop->propertyName);
if (rc != Success)
- return (rc);
+ return rc;
handler = handler->next;
}
}
@@ -720,7 +720,7 @@ XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type,
{
prop = XICreateDeviceProperty (property);
if (!prop)
- return(BadAlloc);
+ return BadAlloc;
add = TRUE;
mode = PropModeReplace;
}
@@ -732,9 +732,9 @@ XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type,
"PropModeReplace" since they will be written over. */
if ((format != prop_value->format) && (mode != PropModeReplace))
- return(BadMatch);
+ return BadMatch;
if ((prop_value->type != type) && (mode != PropModeReplace))
- return(BadMatch);
+ return BadMatch;
new_value = *prop_value;
if (mode == PropModeReplace)
total_len = len;
@@ -798,7 +798,7 @@ XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type,
if (checkonly && rc != Success)
{
free(new_value.data);
- return (rc);
+ return rc;
}
}
handler = handler->next;
@@ -823,7 +823,7 @@ XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type,
send_property_event(dev, prop->propertyName,
(add) ? XIPropertyCreated : XIPropertyModified);
- return(Success);
+ return Success;
}
int
@@ -956,7 +956,7 @@ ProcXDeleteDeviceProperty (ClientPtr client)
if (!ValidAtom(stuff->property))
{
client->errorValue = stuff->property;
- return (BadAtom);
+ return BadAtom;
}
rc = XIDeleteDeviceProperty(dev, stuff->property, TRUE);
@@ -1199,7 +1199,7 @@ ProcXIDeleteProperty(ClientPtr client)
if (!ValidAtom(stuff->property))
{
client->errorValue = stuff->property;
- return (BadAtom);
+ return BadAtom;
}
rc = XIDeleteDeviceProperty(dev, stuff->property, TRUE);
diff --git a/dbe/dbe.c b/dbe/dbe.c
index b4b7466..77b616b 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() */
diff --git a/dbe/midbe.c b/dbe/midbe.c
index 03e8e2e..954f46e 100644
--- a/dbe/midbe.c
+++ b/dbe/midbe.c
@@ -96,7 +96,7 @@ miDbeGetVisualInfo(ScreenPtr pScreen, XdbeScreenVisualInfo *pScrVisInfo)
/* Allocate an array of XdbeVisualInfo items. */
if (!(visInfo = (XdbeVisualInfo *)malloc(count * sizeof(XdbeVisualInfo))))
{
- return(FALSE); /* memory alloc failure */
+ return FALSE; /* memory alloc failure */
}
for (i = 0, k = 0; i < pScreen->numDepths; i++)
@@ -125,7 +125,7 @@ miDbeGetVisualInfo(ScreenPtr pScreen, XdbeScreenVisualInfo *pScrVisInfo)
pScrVisInfo->count = count;
pScrVisInfo->visinfo = visInfo;
- return(TRUE); /* success */
+ return TRUE; /* success */
} /* miDbeGetVisualInfo() */
@@ -175,7 +175,7 @@ miDbeAllocBackBufferName(WindowPtr pWin, XID bufId, int swapAction)
pDbeWindowPriv->height,
pWin->drawable.depth, 0)))
{
- return(BadAlloc);
+ return BadAlloc;
}
/* Get a back pixmap. */
@@ -185,7 +185,7 @@ miDbeAllocBackBufferName(WindowPtr pWin, XID bufId, int swapAction)
pWin->drawable.depth, 0)))
{
(*pScreen->DestroyPixmap)(pDbeWindowPrivPriv->pFrontBuffer);
- return(BadAlloc);
+ return BadAlloc;
}
/* Security creation/labeling check. */
@@ -235,12 +235,12 @@ miDbeAllocBackBufferName(WindowPtr pWin, XID bufId, int swapAction)
if (!AddResource(bufId, dbeDrawableResType,
(pointer)pDbeWindowPrivPriv->pBackBuffer))
{
- return(BadAlloc);
+ return BadAlloc;
}
}
- return(Success);
+ return Success;
} /* miDbeAllocBackBufferName() */
@@ -409,7 +409,7 @@ miDbeSwapBuffers(ClientPtr client, int *pNumWindows, DbeSwapInfoPtr swapInfo)
FreeScratchGC(pGC);
- return(Success);
+ return Success;
} /* miSwapBuffers() */
@@ -571,13 +571,13 @@ miDbePositionWindow(WindowPtr pWin, int x, int y)
if (!(pDbeWindowPriv = DBE_WINDOW_PRIV(pWin)))
{
- return(ret);
+ return ret;
}
if (pDbeWindowPriv->width == pWin->drawable.width &&
pDbeWindowPriv->height == pWin->drawable.height)
{
- return(ret);
+ return ret;
}
width = pWin->drawable.width;
@@ -678,7 +678,7 @@ miDbePositionWindow(WindowPtr pWin, int x, int y)
}
FreeScratchGC(pGC);
- return(FALSE);
+ return FALSE;
}
else
@@ -737,7 +737,7 @@ miDbePositionWindow(WindowPtr pWin, int x, int y)
FreeScratchGC(pGC);
}
- return(ret);
+ return ret;
} /* miDbePositionWindow() */
@@ -783,7 +783,7 @@ miDbeInit(ScreenPtr pScreen, DbeScreenPrivPtr pDbeScreenPriv)
{
if (!dixRegisterPrivateKey(&miDbeWindowPrivPrivKeyRec, PRIVATE_DBE_WINDOW,
sizeof(MiDbeWindowPrivPrivRec)))
- return(FALSE);
+ return FALSE;
/* Wrap functions. */
pDbeScreenPriv->PositionWindow = pScreen->PositionWindow;
@@ -798,6 +798,6 @@ miDbeInit(ScreenPtr pScreen, DbeScreenPrivPtr pDbeScreenPriv)
pDbeScreenPriv->ResetProc = miDbeResetProc;
pDbeScreenPriv->WinPrivDelete = miDbeWinPrivDelete;
- return(TRUE);
+ return TRUE;
} /* miDbeInit() */
diff --git a/dix/colormap.c b/dix/colormap.c
index ae90690..2e9a806 100644
--- a/dix/colormap.c
+++ b/dix/colormap.c
@@ -264,7 +264,7 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
class = pVisual->class;
if(!(class & DynamicClass) && (alloc != AllocNone) && (client != SERVER_ID))
- return (BadMatch);
+ return BadMatch;
size = pVisual->ColormapEntries;
sizebytes = (size * sizeof(Entry)) +
@@ -276,16 +276,16 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
if (mid == pScreen->defColormap) {
pmap = malloc(sizebytes);
if (!pmap)
- return (BadAlloc);
+ return BadAlloc;
if (!dixAllocatePrivates(&pmap->devPrivates, PRIVATE_COLORMAP)) {
free (pmap);
- return (BadAlloc);
+ return BadAlloc;
}
} else {
pmap = _dixAllocateObjectWithPrivates(sizebytes, sizebytes,
offsetof(ColormapRec, devPrivates), PRIVATE_COLORMAP);
if (!pmap)
- return (BadAlloc);
+ return BadAlloc;
}
#if defined(_XSERVER64)
pmap->pad0 = 0;
@@ -324,7 +324,7 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
if (!ppix)
{
free(pmap);
- return (BadAlloc);
+ return BadAlloc;
}
pmap->clientPixelsRed[client] = ppix;
for(i = 0; i < size; i++)
@@ -371,7 +371,7 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
{
free(pmap->clientPixelsRed[client]);
free(pmap);
- return(BadAlloc);
+ return BadAlloc;
}
pmap->clientPixelsGreen[client] = ppix;
for(i = 0; i < size; i++)
@@ -388,7 +388,7 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
free(pmap->clientPixelsGreen[client]);
free(pmap->clientPixelsRed[client]);
free(pmap);
- return(BadAlloc);
+ return BadAlloc;
}
pmap->clientPixelsBlue[client] = ppix;
for(i = 0; i < size; i++)
@@ -399,7 +399,7 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
pmap->flags |= BeingCreated;
if (!AddResource(mid, RT_COLORMAP, (pointer)pmap))
- return (BadAlloc);
+ return BadAlloc;
/*
* Security creation/labeling check
@@ -421,7 +421,7 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
}
pmap->flags &= ~BeingCreated;
*ppcmap = pmap;
- return (Success);
+ return Success;
}
/**
@@ -482,7 +482,7 @@ FreeColormap (pointer value, XID mid)
free(pmap);
} else
dixFreeObjectWithPrivates(pmap, PRIVATE_COLORMAP);
- return(Success);
+ return Success;
}
/* Tell window that pmid has disappeared */
@@ -509,7 +509,7 @@ TellNoMap (WindowPtr pwin, Colormap *pmid)
}
}
- return (WT_WALKCHILDREN);
+ return WT_WALKCHILDREN;
}
/* Tell window that pmid got uninstalled */
@@ -534,7 +534,7 @@ TellLostMap (WindowPtr pwin, pointer value)
DeliverEvents(pwin, &xE, 1, (WindowPtr)NULL);
}
- return (WT_WALKCHILDREN);
+ return WT_WALKCHILDREN;
}
/* Tell window that pmid got installed */
@@ -559,7 +559,7 @@ TellGainedMap (WindowPtr pwin, pointer value)
DeliverEvents(pwin, &xE, 1, (WindowPtr)NULL);
}
- return (WT_WALKCHILDREN);
+ return WT_WALKCHILDREN;
}
@@ -582,7 +582,7 @@ CopyColormapAndFree (Colormap mid, ColormapPtr pSrc, int client)
/* If the create returns non-0, it failed */
result = CreateColormap (mid, pScreen, pVisual, &pmap, alloc, client);
if(result != Success)
- return(result);
+ return result;
if(alloc == AllocAll)
{
memmove((char *)pmap->red, (char *)pSrc->red, size * sizeof(Entry));
@@ -594,7 +594,7 @@ CopyColormapAndFree (Colormap mid, ColormapPtr pSrc, int client)
pSrc->flags &= ~AllAllocated;
FreePixels(pSrc, client);
UpdateColors(pmap);
- return(Success);
+ return Success;
}
CopyFree(REDMAP, client, pSrc, pmap);
@@ -606,7 +606,7 @@ CopyColormapAndFree (Colormap mid, ColormapPtr pSrc, int client)
if (pmap->class & DynamicClass)
UpdateColors(pmap);
/* XXX should worry about removing any RT_CMAPENTRY resource */
- return(Success);
+ return Success;
}
/* Helper routine for freeing large numbers of cells from a map */
@@ -855,7 +855,7 @@ AllocColor (ColormapPtr pmap,
ppix = (Pixel *) realloc(pmap->clientPixelsRed[client],
(npix + 1) * sizeof(Pixel));
if (!ppix)
- return (BadAlloc);
+ return BadAlloc;
ppix[npix] = pixR;
pmap->clientPixelsRed[client] = ppix;
pmap->numPixelsRed[client]++;
@@ -878,21 +878,21 @@ AllocColor (ColormapPtr pmap,
ppix = (Pixel *) realloc(pmap->clientPixelsRed[client],
(npix + 1) * sizeof(Pixel));
if (!ppix)
- return (BadAlloc);
+ return BadAlloc;
ppix[npix] = pixR;
pmap->clientPixelsRed[client] = ppix;
npix = pmap->numPixelsGreen[client];
ppix = (Pixel *) realloc(pmap->clientPixelsGreen[client],
(npix + 1) * sizeof(Pixel));
if (!ppix)
- return (BadAlloc);
+ return BadAlloc;
ppix[npix] = pixG;
pmap->clientPixelsGreen[client] = ppix;
npix = pmap->numPixelsBlue[client];
ppix = (Pixel *) realloc(pmap->clientPixelsBlue[client],
(npix + 1) * sizeof(Pixel));
if (!ppix)
- return (BadAlloc);
+ return BadAlloc;
ppix[npix] = pixB;
pmap->clientPixelsBlue[client] = ppix;
pmap->numPixelsRed[client]++;
@@ -915,7 +915,7 @@ AllocColor (ColormapPtr pmap,
}
if (FindColor(pmap, pmap->red, entries, &rgb, pPix, PSEUDOMAP,
client, AllComp) != Success)
- return (BadAlloc);
+ return BadAlloc;
break;
case DirectColor:
@@ -944,13 +944,13 @@ AllocColor (ColormapPtr pmap,
pixR = (*pPix & pVisual->redMask) >> pVisual->offsetRed;
if (FindColor(pmap, pmap->red, NUMRED(pVisual), &rgb, &pixR, REDMAP,
client, RedComp) != Success)
- return (BadAlloc);
+ return BadAlloc;
pixG = (*pPix & pVisual->greenMask) >> pVisual->offsetGreen;
if (FindColor(pmap, pmap->green, NUMGREEN(pVisual), &rgb, &pixG,
GREENMAP, client, GreenComp) != Success)
{
(void)FreeCo(pmap, client, REDMAP, 1, &pixR, (Pixel)0);
- return (BadAlloc);
+ return BadAlloc;
}
pixB = (*pPix & pVisual->blueMask) >> pVisual->offsetBlue;
if (FindColor(pmap, pmap->blue, NUMBLUE(pVisual), &rgb, &pixB, BLUEMAP,
@@ -958,7 +958,7 @@ AllocColor (ColormapPtr pmap,
{
(void)FreeCo(pmap, client, GREENMAP, 1, &pixG, (Pixel)0);
(void)FreeCo(pmap, client, REDMAP, 1, &pixR, (Pixel)0);
- return (BadAlloc);
+ return BadAlloc;
}
*pPix = pixR | pixG | pixB | ALPHAMASK(pVisual);
@@ -978,14 +978,14 @@ AllocColor (ColormapPtr pmap,
if (!pcr)
{
(void)FreeColors(pmap, client, 1, pPix, (Pixel)0);
- return (BadAlloc);
+ return BadAlloc;
}
pcr->mid = pmap->mid;
pcr->client = client;
if (!AddResource(FakeClientID(client), RT_CMAPENTRY, (pointer)pcr))
- return (BadAlloc);
+ return BadAlloc;
}
- return (Success);
+ return Success;
}
/*
@@ -1172,7 +1172,7 @@ FindBestPixel(EntryPtr pentFirst, int size, xrgb *prgb, int channel)
minval = sum;
}
}
- return(final);
+ return final;
}
static void
@@ -1280,7 +1280,7 @@ FindColor (ColormapPtr pmap, EntryPtr pentFirst, int size, xrgb *prgb,
* a free entry, we're out of luck. Otherwise, we'll usurp a free
* entry and fill it in */
if (!foundFree)
- return (BadAlloc);
+ return BadAlloc;
pent = pentFirst + Free;
pent->fShared = FALSE;
pent->refcnt = (client >= 0) ? 1 : AllocTemporary;
@@ -1339,7 +1339,7 @@ FindColor (ColormapPtr pmap, EntryPtr pentFirst, int size, xrgb *prgb,
gotit:
if (pmap->flags & BeingCreated || client == -1)
- return(Success);
+ return Success;
/* Now remember the pixel, for freeing later */
switch (channel)
{
@@ -1378,13 +1378,13 @@ gotit:
pmap->freeBlue++;
break;
}
- return(BadAlloc);
+ return BadAlloc;
}
ppix[npix] = pixel;
pixp[client] = ppix;
nump[client]++;
- return(Success);
+ return Success;
}
/* Comparison functions -- passed to FindColor to determine if an
@@ -1395,32 +1395,32 @@ AllComp (EntryPtr pent, xrgb *prgb)
if((pent->co.local.red == prgb->red) &&
(pent->co.local.green == prgb->green) &&
(pent->co.local.blue == prgb->blue) )
- return (1);
- return (0);
+ return 1;
+ return 0;
}
static int
RedComp (EntryPtr pent, xrgb *prgb)
{
if (pent->co.local.red == prgb->red)
- return (1);
- return (0);
+ return 1;
+ return 0;
}
static int
GreenComp (EntryPtr pent, xrgb *prgb)
{
if (pent->co.local.green == prgb->green)
- return (1);
- return (0);
+ return 1;
+ return 0;
}
static int
BlueComp (EntryPtr pent, xrgb *prgb)
{
if (pent->co.local.blue == prgb->blue)
- return (1);
- return (0);
+ return 1;
+ return 0;
}
@@ -1508,7 +1508,7 @@ QueryColors (ColormapPtr pmap, int count, Pixel *ppixIn, xrgb *prgbList, ClientP
}
}
}
- return (errVal);
+ return errVal;
}
static void
@@ -1586,7 +1586,7 @@ AllocColorCells (int client, ColormapPtr pmap, int colors, int planes,
class = pmap->class;
if (!(class & DynamicClass))
- return (BadAlloc); /* Shouldn't try on this type */
+ return BadAlloc; /* Shouldn't try on this type */
oldcount = pmap->numPixelsRed[client];
if (pmap->class == DirectColor)
oldcount += pmap->numPixelsGreen[client] + pmap->numPixelsBlue[client];
@@ -1594,7 +1594,7 @@ AllocColorCells (int client, ColormapPtr pmap, int colors, int planes,
{
pcr = malloc(sizeof(colorResource));
if (!pcr)
- return (BadAlloc);
+ return BadAlloc;
}
if (pmap->class == DirectColor)
@@ -1641,7 +1641,7 @@ AllocColorCells (int client, ColormapPtr pmap, int colors, int planes,
ok = BadAlloc;
} else free(pcr);
- return (ok);
+ return ok;
}
@@ -1660,7 +1660,7 @@ AllocColorPlanes (int client, ColormapPtr pmap, int colors,
class = pmap->class;
if (!(class & DynamicClass))
- return (BadAlloc); /* Shouldn't try on this type */
+ return BadAlloc; /* Shouldn't try on this type */
oldcount = pmap->numPixelsRed[client];
if (class == DirectColor)
oldcount += pmap->numPixelsGreen[client] + pmap->numPixelsBlue[client];
@@ -1668,7 +1668,7 @@ AllocColorPlanes (int client, ColormapPtr pmap, int colors,
{
pcr = malloc(sizeof(colorResource));
if (!pcr)
- return (BadAlloc);
+ return BadAlloc;
}
if (class == DirectColor)
@@ -1731,7 +1731,7 @@ AllocColorPlanes (int client, ColormapPtr pmap, int colors,
ok = BadAlloc;
} else free(pcr);
- return (ok);
+ return ok;
}
static int
@@ -1765,7 +1765,7 @@ AllocDirect (int client, ColormapPtr pmap, int c, int r, int g, int b, Bool cont
free(ppixBlue);
free(ppixGreen);
free(ppixRed);
- return(BadAlloc);
+ return BadAlloc;
}
okR = AllocCP(pmap, pmap->red, c, r, contig, ppixRed, prmask);
@@ -1805,7 +1805,7 @@ AllocDirect (int client, ColormapPtr pmap, int c, int r, int g, int b, Bool cont
free(ppixBlue);
free(ppixGreen);
free(ppixRed);
- return(BadAlloc);
+ return BadAlloc;
}
*prmask <<= pmap->pVisual->offsetRed;
@@ -1850,7 +1850,7 @@ AllocDirect (int client, ColormapPtr pmap, int c, int r, int g, int b, Bool cont
free(ppixGreen);
free(ppixRed);
- return (Success);
+ return Success;
}
static int
@@ -1863,9 +1863,9 @@ AllocPseudo (int client, ColormapPtr pmap, int c, int r, Bool contig,
npix = c << r;
if ((r >= 32) || (npix > pmap->freeRed) || (npix < c))
- return(BadAlloc);
+ return BadAlloc;
if(!(ppixTemp = malloc(npix * sizeof(Pixel))))
- return(BadAlloc);
+ return BadAlloc;
ok = AllocCP(pmap, pmap->red, c, r, contig, ppixTemp, pmask);
if (ok)
@@ -1879,7 +1879,7 @@ AllocPseudo (int client, ColormapPtr pmap, int c, int r, Bool contig,
{
for (p = ppixTemp; p < ppixTemp + npix; p++)
pmap->red[*p].refcnt = 0;
- return (BadAlloc);
+ return BadAlloc;
}
pmap->clientPixelsRed[client] = ppix;
ppix += pmap->numPixelsRed[client];
@@ -1895,7 +1895,7 @@ AllocPseudo (int client, ColormapPtr pmap, int c, int r, Bool contig,
pmap->freeRed -= npix;
}
free(ppixTemp);
- return (ok ? Success : BadAlloc);
+ return ok ? Success : BadAlloc;
}
/* Allocates count << planes pixels from colormap pmap for client. If
@@ -1941,11 +1941,11 @@ AllocCP (ColormapPtr pmap, EntryPtr pentFirst, int count, int planes,
ent->fShared = FALSE;
}
*pMask = 0;
- return (TRUE);
+ return TRUE;
}
else if (planes > dplanes)
{
- return (FALSE);
+ return FALSE;
}
/* General case count pixels * 2 ^ planes cells to be allocated */
@@ -1992,7 +1992,7 @@ AllocCP (ColormapPtr pmap, EntryPtr pentFirst, int count, int planes,
}
}
*pMask = mask;
- return (TRUE);
+ return TRUE;
}
}
pixel = save + 1;
@@ -2003,7 +2003,7 @@ AllocCP (ColormapPtr pmap, EntryPtr pentFirst, int count, int planes,
dplanes = pmap->pVisual->nplanes;
if (contig || planes == 1 || dplanes < 3)
- return (FALSE);
+ return FALSE;
/* this will be very slow for large maps, need a better algorithm */
@@ -2073,10 +2073,10 @@ AllocCP (ColormapPtr pmap, EntryPtr pentFirst, int count, int planes,
}
*pMask = mask;
- return (TRUE);
+ return TRUE;
}
}
- return (FALSE);
+ return FALSE;
}
/**
@@ -2224,7 +2224,7 @@ FreeColors (ColormapPtr pmap, int client, int count, Pixel *pixels, Pixel mask)
class = pmap->class;
if (pmap->flags & AllAllocated)
- return(BadAccess);
+ return BadAccess;
if ((class | DynamicClass) == DirectColor)
{
rmask = mask & RGBMASK(pmap->pVisual);
@@ -2252,7 +2252,7 @@ FreeColors (ColormapPtr pmap, int client, int count, Pixel *pixels, Pixel mask)
result = BadValue;
}
/* XXX should worry about removing any RT_CMAPENTRY resource */
- return (result);
+ return result;
}
/**
@@ -2278,7 +2278,7 @@ FreeCo (ColormapPtr pmap, int client, int color, int npixIn, Pixel *ppixIn, Pixe
int offset, numents;
if (npixIn == 0)
- return (errVal);
+ return errVal;
bits = 0;
zapped = 0;
base = lowbit (mask);
@@ -2404,7 +2404,7 @@ FreeCo (ColormapPtr pmap, int client, int color, int npixIn, Pixel *ppixIn, Pixe
break;
}
}
- return (errVal);
+ return errVal;
}
@@ -2426,7 +2426,7 @@ StoreColors (ColormapPtr pmap, int count, xColorItem *defs, ClientPtr client)
class = pmap->class;
if(!(class & DynamicClass) && !(pmap->flags & BeingCreated))
{
- return(BadAccess);
+ return BadAccess;
}
pVisual = pmap->pVisual;
@@ -2674,7 +2674,7 @@ StoreColors (ColormapPtr pmap, int count, xColorItem *defs, ClientPtr client)
* count, the count of proposed entries */
if (idef != 0)
( *pmap->pScreen->StoreColors) (pmap, idef, defs);
- return (errVal);
+ return errVal;
}
int
@@ -2685,7 +2685,7 @@ IsMapInstalled(Colormap map, WindowPtr pWin)
pmaps = malloc(pWin->drawable.pScreen->maxInstalledCmaps*sizeof(Colormap));
if(!pmaps)
- return(FALSE);
+ return FALSE;
nummaps = (*pWin->drawable.pScreen->ListInstalledColormaps)
(pWin->drawable.pScreen, pmaps);
found = FALSE;
@@ -2698,7 +2698,7 @@ IsMapInstalled(Colormap map, WindowPtr pWin)
}
}
free(pmaps);
- return (found);
+ return found;
}
struct colormap_lookup_data {
diff --git a/dix/cursor.c b/dix/cursor.c
index 67592c5..72a7609 100644
--- a/dix/cursor.c
+++ b/dix/cursor.c
@@ -122,7 +122,7 @@ FreeCursor(pointer value, XID cid)
DeviceIntPtr pDev = NULL; /* unused anyway */
if ( --pCurs->refcnt != 0)
- return(Success);
+ return Success;
for (nscr = 0; nscr < screenInfo.numScreens; nscr++)
{
@@ -132,7 +132,7 @@ FreeCursor(pointer value, XID cid)
FreeCursorBits(pCurs->bits);
dixFiniPrivates(pCurs, PRIVATE_CURSOR);
free( pCurs);
- return(Success);
+ return Success;
}
diff --git a/dix/devices.c b/dix/devices.c
index 8f9c8ff..bca2caf 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -2117,11 +2117,11 @@ ProcChangePointerControl(ClientPtr client)
ctrl = mouse->ptrfeed->ctrl;
if ((stuff->doAccel != xTrue) && (stuff->doAccel != xFalse)) {
client->errorValue = stuff->doAccel;
- return(BadValue);
+ return BadValue;
}
if ((stuff->doThresh != xTrue) && (stuff->doThresh != xFalse)) {
client->errorValue = stuff->doThresh;
- return(BadValue);
+ return BadValue;
}
if (stuff->doAccel) {
if (stuff->accelNum == -1) {
diff --git a/dix/dispatch.c b/dix/dispatch.c
index 44164f2..0e5aced 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -631,7 +631,7 @@ CreateConnectionBlock(void)
int
ProcBadRequest(ClientPtr client)
{
- return (BadRequest);
+ return BadRequest;
}
int
@@ -1017,7 +1017,7 @@ ProcInternAtom(ClientPtr client)
if ((stuff->onlyIfExists != xTrue) && (stuff->onlyIfExists != xFalse))
{
client->errorValue = stuff->onlyIfExists;
- return(BadValue);
+ return BadValue;
}
tchar = (char *) &stuff[1];
atom = MakeAtom(tchar, stuff->nbytes, !stuff->onlyIfExists);
@@ -1033,7 +1033,7 @@ ProcInternAtom(ClientPtr client)
return Success;
}
else
- return (BadAlloc);
+ return BadAlloc;
}
int
@@ -1060,7 +1060,7 @@ ProcGetAtomName(ClientPtr client)
else
{
client->errorValue = stuff->id;
- return (BadAtom);
+ return BadAtom;
}
}
@@ -1275,7 +1275,7 @@ ProcQueryFont(ClientPtr client)
reply = calloc(1, rlength);
if(!reply)
{
- return(BadAlloc);
+ return BadAlloc;
}
reply->type = X_Reply;
@@ -1309,11 +1309,11 @@ ProcQueryTextExtents(ClientPtr client)
if (stuff->oddLength)
{
if (length == 0)
- return(BadLength);
+ return BadLength;
length--;
}
if (!QueryTextExtents(pFont, length, (unsigned char *)&stuff[1], &info))
- return(BadAlloc);
+ return BadAlloc;
reply.type = X_Reply;
reply.length = 0;
reply.sequenceNumber = client->sequence;
@@ -1430,7 +1430,7 @@ CreatePmap:
return Success;
(*pDraw->pScreen->DestroyPixmap)(pMap);
}
- return (BadAlloc);
+ return BadAlloc;
}
int
@@ -1480,7 +1480,7 @@ ProcCreateGC(ClientPtr client)
if (error != Success)
return error;
if (!AddResource(stuff->gc, RT_GC, (pointer)pGC))
- return (BadAlloc);
+ return BadAlloc;
return Success;
}
@@ -1520,7 +1520,7 @@ ProcCopyGC(ClientPtr client)
if (result != Success)
return result;
if ((dstGC->pScreen != pGC->pScreen) || (dstGC->depth != pGC->depth))
- return (BadMatch);
+ return BadMatch;
if (stuff->mask & ~GCAllBits)
{
client->errorValue = stuff->mask;
@@ -1574,7 +1574,7 @@ ProcSetClipRectangles(ClientPtr client)
nr = (client->req_len << 2) - sizeof(xSetClipRectanglesReq);
if (nr & 4)
- return(BadLength);
+ return BadLength;
nr >>= 3;
return SetClipRects(pGC, stuff->xOrigin, stuff->yOrigin,
nr, (xRectangle *)&stuff[1], (int)stuff->ordering);
@@ -1610,12 +1610,12 @@ ProcClearToBackground(ClientPtr client)
if (pWin->drawable.class == InputOnly)
{
client->errorValue = stuff->window;
- return (BadMatch);
+ return BadMatch;
}
if ((stuff->exposures != xTrue) && (stuff->exposures != xFalse))
{
client->errorValue = stuff->exposures;
- return(BadValue);
+ return BadValue;
}
(*pWin->drawable.pScreen->ClearToBackground)(pWin, stuff->x, stuff->y,
stuff->width, stuff->height,
@@ -1645,7 +1645,7 @@ ProcCopyArea(ClientPtr client)
if ((pDst->pScreen != pSrc->pScreen) || (pDst->depth != pSrc->depth))
{
client->errorValue = stuff->dstDrawable;
- return (BadMatch);
+ return BadMatch;
}
}
else
@@ -1687,7 +1687,7 @@ ProcCopyPlane(ClientPtr client)
if (pdstDraw->pScreen != psrcDraw->pScreen)
{
client->errorValue = stuff->dstDrawable;
- return (BadMatch);
+ return BadMatch;
}
}
else
@@ -1698,7 +1698,7 @@ ProcCopyPlane(ClientPtr client)
(stuff->bitPlane > (1L << (psrcDraw->depth - 1))))
{
client->errorValue = stuff->bitPlane;
- return(BadValue);
+ return BadValue;
}
pRgn = (*pGC->ops->CopyPlane)(psrcDraw, pdstDraw, pGC, stuff->srcX, stuff->srcY,
@@ -1772,7 +1772,7 @@ ProcPolySegment(ClientPtr client)
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
nsegs = (client->req_len << 2) - sizeof(xPolySegmentReq);
if (nsegs & 4)
- return(BadLength);
+ return BadLength;
nsegs >>= 3;
if (nsegs)
(*pGC->ops->PolySegment)(pDraw, pGC, nsegs, (xSegment *) &stuff[1]);
@@ -1791,7 +1791,7 @@ ProcPolyRectangle (ClientPtr client)
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
nrects = (client->req_len << 2) - sizeof(xPolyRectangleReq);
if (nrects & 4)
- return(BadLength);
+ return BadLength;
nrects >>= 3;
if (nrects)
(*pGC->ops->PolyRectangle)(pDraw, pGC,
@@ -1811,7 +1811,7 @@ ProcPolyArc(ClientPtr client)
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
narcs = (client->req_len << 2) - sizeof(xPolyArcReq);
if (narcs % sizeof(xArc))
- return(BadLength);
+ return BadLength;
narcs /= sizeof(xArc);
if (narcs)
(*pGC->ops->PolyArc)(pDraw, pGC, narcs, (xArc *) &stuff[1]);
@@ -1861,7 +1861,7 @@ ProcPolyFillRectangle(ClientPtr client)
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
things = (client->req_len << 2) - sizeof(xPolyFillRectangleReq);
if (things & 4)
- return(BadLength);
+ return BadLength;
things >>= 3;
if (things)
@@ -1882,7 +1882,7 @@ ProcPolyFillArc(ClientPtr client)
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
narcs = (client->req_len << 2) - sizeof(xPolyFillArcReq);
if (narcs % sizeof(xArc))
- return(BadLength);
+ return BadLength;
narcs /= sizeof(xArc);
if (narcs)
(*pGC->ops->PolyFillArc) (pDraw, pGC, narcs, (xArc *) &stuff[1]);
@@ -2019,7 +2019,7 @@ DoGetImage(ClientPtr client, int format, Drawable drawable,
if ((format != XYPixmap) && (format != ZPixmap))
{
client->errorValue = format;
- return(BadValue);
+ return BadValue;
}
rc = dixLookupDrawable(&pDraw, drawable, client, 0, DixReadAccess);
if (rc != Success)
@@ -2103,7 +2103,7 @@ DoGetImage(ClientPtr client, int format, Drawable drawable,
if (im_return) {
pBuf = calloc(1, sz_xGetImageReply + length);
if (!pBuf)
- return (BadAlloc);
+ return BadAlloc;
if (widthBytesLine == 0)
linesPerBuf = 0;
else
@@ -2140,7 +2140,7 @@ DoGetImage(ClientPtr client, int format, Drawable drawable,
}
}
if(!(pBuf = calloc(1, length)))
- return (BadAlloc);
+ return BadAlloc;
WriteReplyToClient(client, sizeof (xGetImageReply), &xgi);
}
@@ -2362,7 +2362,7 @@ ProcCreateColormap(ClientPtr client)
if ((stuff->alloc != AllocNone) && (stuff->alloc != AllocAll))
{
client->errorValue = stuff->alloc;
- return(BadValue);
+ return BadValue;
}
mid = stuff->mid;
LEGAL_NEW_RESOURCE(mid, client);
@@ -2381,7 +2381,7 @@ ProcCreateColormap(ClientPtr client)
(int)stuff->alloc, client->index);
}
client->errorValue = stuff->visual;
- return(BadMatch);
+ return BadMatch;
}
int
@@ -2507,7 +2507,7 @@ ProcListInstalledColormaps(ClientPtr client)
pWin->drawable.pScreen->maxInstalledCmaps *
sizeof(Colormap));
if(!preply)
- return(BadAlloc);
+ return BadAlloc;
preply->type = X_Reply;
preply->sequenceNumber = client->sequence;
@@ -2595,7 +2595,7 @@ ProcAllocNamedColor (ClientPtr client)
return Success;
}
else
- return(BadName);
+ return BadName;
}
else
@@ -2626,18 +2626,18 @@ ProcAllocColorCells (ClientPtr client)
if (!npixels)
{
client->errorValue = npixels;
- return (BadValue);
+ return BadValue;
}
if (stuff->contiguous != xTrue && stuff->contiguous != xFalse)
{
client->errorValue = stuff->contiguous;
- return (BadValue);
+ return BadValue;
}
nmasks = stuff->planes;
length = ((long)npixels + (long)nmasks) * sizeof(Pixel);
ppixels = malloc(length);
if(!ppixels)
- return(BadAlloc);
+ return BadAlloc;
pmasks = ppixels + npixels;
if( (rc = AllocColorCells(client->index, pcmp, npixels, nmasks,
@@ -2690,12 +2690,12 @@ ProcAllocColorPlanes(ClientPtr client)
if (!npixels)
{
client->errorValue = npixels;
- return (BadValue);
+ return BadValue;
}
if (stuff->contiguous != xTrue && stuff->contiguous != xFalse)
{
client->errorValue = stuff->contiguous;
- return (BadValue);
+ return BadValue;
}
acpr.type = X_Reply;
acpr.sequenceNumber = client->sequence;
@@ -2703,7 +2703,7 @@ ProcAllocColorPlanes(ClientPtr client)
length = (long)npixels * sizeof(Pixel);
ppixels = malloc(length);
if(!ppixels)
- return(BadAlloc);
+ return BadAlloc;
if( (rc = AllocColorPlanes(client->index, pcmp, npixels,
(int)stuff->red, (int)stuff->green, (int)stuff->blue,
(Bool)stuff->contiguous, ppixels,
@@ -2746,7 +2746,7 @@ ProcFreeColors(ClientPtr client)
int count;
if(pcmp->flags & AllAllocated)
- return(BadAccess);
+ return BadAccess;
count = bytes_to_int32((client->req_len << 2) - sizeof(xFreeColorsReq));
return FreeColors(pcmp, client->index, count,
(Pixel *)&stuff[1], (Pixel)stuff->planeMask);
@@ -2774,7 +2774,7 @@ ProcStoreColors (ClientPtr client)
count = (client->req_len << 2) - sizeof(xStoreColorsReq);
if (count % sizeof(xColorItem))
- return(BadLength);
+ return BadLength;
count /= sizeof(xColorItem);
return StoreColors(pcmp, count, (xColorItem *)&stuff[1], client);
}
@@ -2806,7 +2806,7 @@ ProcStoreNamedColor (ClientPtr client)
def.pixel = stuff->pixel;
return StoreColors(pcmp, 1, &def, client);
}
- return (BadName);
+ return BadName;
}
else
{
@@ -2834,7 +2834,7 @@ ProcQueryColors(ClientPtr client)
count = bytes_to_int32((client->req_len << 2) - sizeof(xQueryColorsReq));
prgbs = calloc(1, count * sizeof(xrgb));
if(!prgbs && count)
- return(BadAlloc);
+ return BadAlloc;
if( (rc = QueryColors(pcmp, count, (Pixel *)&stuff[1], prgbs, client)) )
{
free(prgbs);
@@ -2892,7 +2892,7 @@ ProcLookupColor(ClientPtr client)
WriteReplyToClient(client, sizeof(xLookupColorReply), &lcr);
return Success;
}
- return (BadName);
+ return BadName;
}
else
{
@@ -2940,24 +2940,24 @@ ProcCreateCursor (ClientPtr client)
|| src->drawable.height != msk->drawable.height
|| src->drawable.depth != 1
|| msk->drawable.depth != 1)
- return (BadMatch);
+ return BadMatch;
width = src->drawable.width;
height = src->drawable.height;
if ( stuff->x > width
|| stuff->y > height )
- return (BadMatch);
+ return BadMatch;
n = BitmapBytePad(width)*height;
srcbits = calloc(1, n);
if (!srcbits)
- return (BadAlloc);
+ return BadAlloc;
mskbits = malloc(n);
if (!mskbits)
{
free(srcbits);
- return (BadAlloc);
+ return BadAlloc;
}
(* src->drawable.pScreen->GetImage)( (DrawablePtr)src, 0, 0, width, height,
@@ -3053,7 +3053,7 @@ ProcQueryBestSize (ClientPtr client)
(stuff->class != StippleShape))
{
client->errorValue = stuff->class;
- return(BadValue);
+ return BadValue;
}
rc = dixLookupDrawable(&pDraw, stuff->drawable, client, M_ANY,
@@ -3061,7 +3061,7 @@ ProcQueryBestSize (ClientPtr client)
if (rc != Success)
return rc;
if (stuff->class != CursorShape && pDraw->type == UNDRAWABLE_WINDOW)
- return (BadMatch);
+ return BadMatch;
pScreen = pDraw->pScreen;
rc = XaceHook(XACE_SCREEN_ACCESS, client, pScreen, DixGetAttrAccess);
if (rc != Success)
@@ -3201,7 +3201,7 @@ ProcListHosts(ClientPtr client)
result = GetHosts(&pdata, &nHosts, &len, &reply.enabled);
if (result != Success)
- return(result);
+ return result;
reply.type = X_Reply;
reply.sequenceNumber = client->sequence;
reply.nHosts = nHosts;
@@ -3276,7 +3276,7 @@ ProcKillClient(ClientPtr client)
* doesn't try to touch client
*/
isItTimeToYield = TRUE;
- return (Success);
+ return Success;
}
return Success;
}
@@ -3302,12 +3302,12 @@ ProcSetFontPath(ClientPtr client)
while (--nfonts >= 0)
{
if ((total == 0) || (total < (n = (*ptr + 1))))
- return(BadLength);
+ return BadLength;
total -= n;
ptr += n;
}
if (total >= 4)
- return(BadLength);
+ return BadLength;
return SetFontPath(client, stuff->nFonts, (unsigned char *)&stuff[1]);
}
@@ -3356,7 +3356,7 @@ ProcChangeCloseDownMode(ClientPtr client)
else
{
client->errorValue = stuff->mode;
- return (BadValue);
+ return BadValue;
}
}
@@ -3573,7 +3573,7 @@ ClientPtr NextAvailableClient(pointer ospriv)
clientinfo.setup = (xConnSetup *) NULL;
CallCallbacks((&ClientStateCallback), (pointer)&clientinfo);
}
- return(client);
+ return client;
}
int
@@ -3585,7 +3585,7 @@ ProcInitialConnection(ClientPtr client)
prefix = (xConnClientPrefix *)((char *)stuff + sz_xReq);
if ((prefix->byteOrder != 'l') && (prefix->byteOrder != 'B'))
- return (client->noClientException = -1);
+ return client->noClientException = -1;
if (((*(char *) &whichbyte) && (prefix->byteOrder == 'B')) ||
(!(*(char *) &whichbyte) && (prefix->byteOrder == 'l')))
{
@@ -3626,7 +3626,7 @@ SendConnSetup(ClientPtr client, char *reason)
else
(void)WriteToClient(client, sz_xConnSetupPrefix, (char *) &csp);
(void)WriteToClient(client, (int)csp.lengthReason, reason);
- return (client->noClientException = -1);
+ return client->noClientException = -1;
}
numScreens = screenInfo.numScreens;
diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index fd5da1b..b51ad84 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -482,7 +482,7 @@ CloseFont(pointer value, XID fid)
FontPtr pfont = (FontPtr)value;
if (pfont == NullFont)
- return (Success);
+ return Success;
if (--pfont->refcnt == 0) {
if (patternCache)
RemoveCachedFontPattern (patternCache, pfont);
@@ -504,7 +504,7 @@ CloseFont(pointer value, XID fid)
(*fpe_functions[fpe->type].close_font) (fpe, pfont);
FreeFPE(fpe);
}
- return (Success);
+ return Success;
}
diff --git a/dix/dixutils.c b/dix/dixutils.c
index cb1c97c..470bb5d 100644
--- a/dix/dixutils.c
+++ b/dix/dixutils.c
@@ -296,17 +296,17 @@ AlterSaveSetForClient(ClientPtr client, WindowPtr pWin, unsigned mode,
if (mode == SetModeInsert)
{
if (j < numnow) /* duplicate */
- return(Success);
+ return Success;
numnow++;
pTmp = (SaveSetElt *)realloc(client->saveSet, sizeof(*pTmp) * numnow);
if (!pTmp)
- return(BadAlloc);
+ return BadAlloc;
client->saveSet = pTmp;
client->numSaved = numnow;
SaveSetAssignWindow(client->saveSet[numnow - 1], pWin);
SaveSetAssignToRoot(client->saveSet[numnow - 1], toRoot);
SaveSetAssignMap(client->saveSet[numnow - 1], map);
- return(Success);
+ return Success;
}
else if ((mode == SetModeDelete) && (j < numnow))
{
@@ -328,9 +328,9 @@ AlterSaveSetForClient(ClientPtr client, WindowPtr pWin, unsigned mode,
client->saveSet = (SaveSetElt *)NULL;
}
client->numSaved = numnow;
- return(Success);
+ return Success;
}
- return(Success);
+ return Success;
}
void
diff --git a/dix/events.c b/dix/events.c
index 2dc0e98..ae9847c 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -331,7 +331,7 @@ IsKeyboardDevice(DeviceIntPtr dev)
Bool
IsMaster(DeviceIntPtr dev)
{
- return (dev->type == MASTER_POINTER || dev->type == MASTER_KEYBOARD);
+ return dev->type == MASTER_POINTER || dev->type == MASTER_KEYBOARD;
}
static WindowPtr XYToWindow(
@@ -4083,7 +4083,7 @@ OtherClientGone(pointer value, XID id)
}
free(other);
RecalculateDeliverableEvents(pWin);
- return(Success);
+ return Success;
}
prev = other;
}
@@ -4488,7 +4488,7 @@ SetInputFocus(
/* It is a match error to try to set the input focus to an
unviewable window. */
if(!focusWin->realized)
- return(BadMatch);
+ return BadMatch;
}
rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixSetFocusAccess);
if (rc != Success)
@@ -5005,7 +5005,7 @@ ProcQueryPointer(ClientPtr client)
WriteReplyToClient(client, sizeof(xQueryPointerReply), &rep);
- return(Success);
+ return Success;
}
/**
@@ -5209,8 +5209,8 @@ ProcUngrabKey(ClientPtr client)
tempGrab.next = NULL;
if (!DeletePassiveGrabFromList(&tempGrab))
- return(BadAlloc);
- return(Success);
+ return BadAlloc;
+ return Success;
}
/**
@@ -5404,8 +5404,8 @@ ProcUngrabButton(ClientPtr client)
tempGrab.next = NULL;
if (!DeletePassiveGrabFromList(&tempGrab))
- return(BadAlloc);
- return(Success);
+ return BadAlloc;
+ return Success;
}
/**
@@ -5619,7 +5619,7 @@ ProcRecolorCursor(ClientPtr client)
( *pscr->RecolorCursor)(PickPointer(client), pscr, pCursor,
(pCursor == pSprite->current) && displayed);
}
- return (Success);
+ return Success;
}
/**
diff --git a/dix/extension.c b/dix/extension.c
index f422ea3..c8e921a 100644
--- a/dix/extension.c
+++ b/dix/extension.c
@@ -91,10 +91,10 @@ AddExtension(char *name, int NumEvents, int NumErrors,
ext = calloc(sizeof (ExtensionEntry), 1);
if (!ext)
- return(NULL);
+ return NULL;
if (!dixAllocatePrivates(&ext->devPrivates, PRIVATE_EXTENSION)) {
free(ext);
- return(NULL);
+ return NULL;
}
ext->name = malloc(strlen(name) + 1);
ext->num_aliases = 0;
@@ -149,7 +149,7 @@ AddExtension(char *name, int NumEvents, int NumErrors,
}
RegisterExtensionNames(ext);
- return(ext);
+ return ext;
}
Bool AddExtensionAlias(char *alias, ExtensionEntry *ext)
@@ -335,7 +335,7 @@ ProcListExtensions(ClientPtr client)
reply.length = bytes_to_int32(total_length);
buffer = bufptr = malloc(total_length);
if (!buffer)
- return(BadAlloc);
+ return BadAlloc;
for (i=0; i<NumExtensions; i++)
{
int len;
diff --git a/dix/gc.c b/dix/gc.c
index 6d022f1..6da243e 100644
--- a/dix/gc.c
+++ b/dix/gc.c
@@ -562,7 +562,7 @@ out:
pGC = (GCPtr)NULL;
}
- return (pGC);
+ return pGC;
}
static Bool
@@ -785,7 +785,7 @@ FreeGC(pointer value, XID gid)
if (pGC->dash != DefaultDash)
free(pGC->dash);
dixFreeObjectWithPrivates(pGC, PRIVATE_GC);
- return(Success);
+ return Success;
}
/* CreateScratchGC(pScreen, depth)
@@ -1066,7 +1066,7 @@ SetClipRects(GCPtr pGC, int xOrigin, int yOrigin, int nrects,
newct = VerifyRectOrder(nrects, prects, ordering);
if (newct < 0)
- return(BadMatch);
+ return BadMatch;
size = nrects * sizeof(xRectangle);
prectsNew = malloc(size);
if (!prectsNew && size)
diff --git a/dix/main.c b/dix/main.c
index 0f499dd..5c46dc1 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -348,6 +348,6 @@ int main(int argc, char *argv[], char *envp[])
free(ConnectionInfo);
ConnectionInfo = NULL;
}
- return(0);
+ return 0;
}
diff --git a/dix/property.c b/dix/property.c
index 6523107..87e5c2d 100644
--- a/dix/property.c
+++ b/dix/property.c
@@ -230,12 +230,12 @@ ProcChangeProperty(ClientPtr client)
if (!ValidAtom(stuff->property))
{
client->errorValue = stuff->property;
- return(BadAtom);
+ return BadAtom;
}
if (!ValidAtom(stuff->type))
{
client->errorValue = stuff->type;
- return(BadAtom);
+ return BadAtom;
}
err = dixChangeWindowProperty(client, pWin, stuff->property, stuff->type,
@@ -268,15 +268,15 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property,
if (rc == BadMatch) /* just add to list */
{
if (!pWin->optional && !MakeWindowOptional (pWin))
- return(BadAlloc);
+ return BadAlloc;
pProp = dixAllocateObjectWithPrivates(PropertyRec, PRIVATE_PROPERTY);
if (!pProp)
- return(BadAlloc);
+ return BadAlloc;
data = malloc(totalSize);
if (!data && len)
{
dixFreeObjectWithPrivates(pProp, PRIVATE_PROPERTY);
- return(BadAlloc);
+ return BadAlloc;
}
memcpy(data, value, totalSize);
pProp->propertyName = property;
@@ -304,9 +304,9 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property,
"PropModeReplace" since they will be written over. */
if ((format != pProp->format) && (mode != PropModeReplace))
- return(BadMatch);
+ return BadMatch;
if ((pProp->type != type) && (mode != PropModeReplace))
- return(BadMatch);
+ return BadMatch;
/* save the old values for later */
savedProp = *pProp;
@@ -315,7 +315,7 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property,
{
data = malloc(totalSize);
if (!data && len)
- return(BadAlloc);
+ return BadAlloc;
memcpy(data, value, totalSize);
pProp->data = data;
pProp->size = len;
@@ -330,7 +330,7 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property,
{
data = malloc((pProp->size + len) * sizeInBytes);
if (!data)
- return(BadAlloc);
+ return BadAlloc;
memcpy(data, pProp->data, pProp->size * sizeInBytes);
memcpy(data + pProp->size * sizeInBytes, value, totalSize);
pProp->data = data;
@@ -340,7 +340,7 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property,
{
data = malloc(sizeInBytes * (len + pProp->size));
if (!data)
- return(BadAlloc);
+ return BadAlloc;
memcpy(data + totalSize, pProp->data, pProp->size * sizeInBytes);
memcpy(data, value, totalSize);
pProp->data = data;
@@ -369,7 +369,7 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property,
if (sendevent)
deliverPropertyNotifyEvent(pWin, PropertyNewValue, pProp->propertyName);
- return(Success);
+ return Success;
}
int
@@ -477,17 +477,17 @@ ProcGetProperty(ClientPtr client)
if (!ValidAtom(stuff->property))
{
client->errorValue = stuff->property;
- return(BadAtom);
+ return BadAtom;
}
if ((stuff->delete != xTrue) && (stuff->delete != xFalse))
{
client->errorValue = stuff->delete;
- return(BadValue);
+ return BadValue;
}
if ((stuff->type != AnyPropertyType) && !ValidAtom(stuff->type))
{
client->errorValue = stuff->type;
- return(BadAtom);
+ return BadAtom;
}
memset(&reply, 0, sizeof(xGetPropertyReply));
@@ -513,7 +513,7 @@ ProcGetProperty(ClientPtr client)
reply.nItems = 0;
reply.propertyType = pProp->type;
WriteReplyToClient(client, sizeof(xGenericReply), &reply);
- return(Success);
+ return Success;
}
/*
@@ -635,7 +635,7 @@ ProcDeleteProperty(ClientPtr client)
if (!ValidAtom(stuff->property))
{
client->errorValue = stuff->property;
- return (BadAtom);
+ return BadAtom;
}
return DeleteProperty(client, pWin, stuff->property);
diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c
index cedc829..30e14b1 100644
--- a/dix/ptrveloc.c
+++ b/dix/ptrveloc.c
@@ -494,7 +494,7 @@ CalcTracker(DeviceVelocityPtr vel, int offset, int cur_t){
+ vel->tracker[index].dy * vel->tracker[index].dy);
int dtime = cur_t - vel->tracker[index].time;
if(dtime > 0)
- return (dist / dtime);
+ return dist / dtime;
else
return 0;/* synonymous for NaN, since we're not C99 */
}
diff --git a/dix/region.c b/dix/region.c
index a77d17b..5ba3457 100644
--- a/dix/region.c
+++ b/dix/region.c
@@ -245,7 +245,7 @@ RegionCreate(BoxPtr rect, int size)
RegionInit (pReg, rect, size);
- return(pReg);
+ return pReg;
}
void
@@ -290,7 +290,7 @@ RegionIsValid(RegionPtr reg)
(reg->extents.y1 == reg->extents.y2) &&
(reg->data->size || (reg->data == &RegionEmptyData)));
else if (numRects == 1)
- return (!reg->data);
+ return !reg->data;
else
{
BoxPtr pboxP, pboxN;
@@ -428,7 +428,7 @@ RegionCoalesce (
do {
if ((pPrevBox->x1 != pCurBox->x1) || (pPrevBox->x2 != pCurBox->x2)) {
- return (curStart);
+ return curStart;
}
pPrevBox++;
pCurBox++;
@@ -1655,5 +1655,5 @@ RegionClipSpans(
}
}
}
- return (pwidthNew - pwidthNewStart);
+ return pwidthNew - pwidthNewStart;
}
diff --git a/dix/resource.c b/dix/resource.c
index ce025f9..a0fe719 100644
--- a/dix/resource.c
+++ b/dix/resource.c
@@ -901,7 +901,7 @@ LegalNewID(XID id, ClientPtr client)
rc = dixLookupResourceByClass(&val, id, RC_ANY, serverClient,
DixGetAttrAccess);
- return (rc == BadValue);
+ return rc == BadValue;
}
return FALSE;
}
diff --git a/dix/swapreq.c b/dix/swapreq.c
index 5d7d71c..2e34711 100644
--- a/dix/swapreq.c
+++ b/dix/swapreq.c
@@ -318,7 +318,7 @@ SProcSendEvent(ClientPtr client)
/* Swap event */
proc = EventSwapVector[stuff->event.u.u.type & 0177];
if (!proc || proc == NotImplemented) /* no swapping proc; invalid event type? */
- return (BadValue);
+ return BadValue;
(*proc)(&stuff->event, &eventT);
stuff->event = eventT;
diff --git a/dix/window.c b/dix/window.c
index 8f3ffa3..4a47dd5 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -221,12 +221,12 @@ TraverseTree(WindowPtr pWin, VisitWindowProcPtr func, pointer data)
WindowPtr pChild;
if (!(pChild = pWin))
- return(WT_NOMATCH);
+ return WT_NOMATCH;
while (1)
{
result = (* func)(pChild, data);
if (result == WT_STOPWALKING)
- return(WT_STOPWALKING);
+ return WT_STOPWALKING;
if ((result == WT_WALKCHILDREN) && pChild->firstChild)
{
pChild = pChild->firstChild;
@@ -238,7 +238,7 @@ TraverseTree(WindowPtr pWin, VisitWindowProcPtr func, pointer data)
break;
pChild = pChild->nextSib;
}
- return(WT_NOMATCH);
+ return WT_NOMATCH;
}
/*****
@@ -529,9 +529,9 @@ RealChildHead(WindowPtr pWin)
if (!pWin->parent &&
(screenIsSaved == SCREEN_SAVER_ON) &&
(HasSaverWindow (pWin->drawable.pScreen)))
- return (pWin->firstChild);
+ return pWin->firstChild;
else
- return (NullWindow);
+ return NullWindow;
}
/*****
@@ -1549,7 +1549,7 @@ MoveWindowInStack(WindowPtr pWin, WindowPtr pNextSib)
(*pWin->drawable.pScreen->RestackWindow)(pWin, pWin->nextSib);
#endif
- return( pFirstChange );
+ return pFirstChange;
}
void
@@ -1795,12 +1795,12 @@ IsSiblingAboveMe(
while (pWin)
{
if (pWin == pSib)
- return(Above);
+ return Above;
else if (pWin == pMe)
- return(Below);
+ return Below;
pWin = pWin->nextSib;
}
- return(Below);
+ return Below;
}
static BoxPtr
@@ -1814,7 +1814,7 @@ WindowExtents(
+ wBorderWidth (pWin);
pBox->y2 = pWin->drawable.y + (int)pWin->drawable.height
+ wBorderWidth (pWin);
- return(pBox);
+ return pBox;
}
#define IS_SHAPED(pWin) (wBoundingShape (pWin) != (RegionPtr) NULL)
@@ -1872,10 +1872,10 @@ AnyWindowOverlapsMe(
if (BOXES_OVERLAP(sbox, box)
&& ShapeOverlap (pWin, box, pSib, sbox)
)
- return(TRUE);
+ return TRUE;
}
}
- return(FALSE);
+ return FALSE;
}
static Bool
@@ -1895,10 +1895,10 @@ IOverlapAnyWindow(
if (BOXES_OVERLAP(sbox, box)
&& ShapeOverlap (pWin, box, pSib, sbox)
)
- return(TRUE);
+ return TRUE;
}
}
- return(FALSE);
+ return FALSE;
}
/*
@@ -1955,63 +1955,63 @@ WhereDoIGoInTheStack(
{
case Above:
if (pSib)
- return(pSib);
+ return pSib;
else if (pWin == pFirst)
- return(pWin->nextSib);
+ return pWin->nextSib;
else
- return(pFirst);
+ return pFirst;
case Below:
if (pSib)
if (pSib->nextSib != pWin)
- return(pSib->nextSib);
+ return pSib->nextSib;
else
- return(pWin->nextSib);
+ return pWin->nextSib;
else
return NullWindow;
case TopIf:
if ((!pWin->mapped || (pSib && !pSib->mapped)))
- return(pWin->nextSib);
+ return pWin->nextSib;
else if (pSib)
{
if ((IsSiblingAboveMe(pWin, pSib) == Above) &&
(RegionContainsRect(&pSib->borderSize, &box) != rgnOUT))
- return(pFirst);
+ return pFirst;
else
- return(pWin->nextSib);
+ return pWin->nextSib;
}
else if (AnyWindowOverlapsMe(pWin, pHead, &box))
- return(pFirst);
+ return pFirst;
else
- return(pWin->nextSib);
+ return pWin->nextSib;
case BottomIf:
if ((!pWin->mapped || (pSib && !pSib->mapped)))
- return(pWin->nextSib);
+ return pWin->nextSib;
else if (pSib)
{
if ((IsSiblingAboveMe(pWin, pSib) == Below) &&
(RegionContainsRect(&pSib->borderSize, &box) != rgnOUT))
return NullWindow;
else
- return(pWin->nextSib);
+ return pWin->nextSib;
}
else if (IOverlapAnyWindow(pWin, &box))
return NullWindow;
else
- return(pWin->nextSib);
+ return pWin->nextSib;
case Opposite:
if ((!pWin->mapped || (pSib && !pSib->mapped)))
- return(pWin->nextSib);
+ return pWin->nextSib;
else if (pSib)
{
if (RegionContainsRect(&pSib->borderSize, &box) != rgnOUT)
{
if (IsSiblingAboveMe(pWin, pSib) == Above)
- return(pFirst);
+ return pFirst;
else
return NullWindow;
}
else
- return(pWin->nextSib);
+ return pWin->nextSib;
}
else if (AnyWindowOverlapsMe(pWin, pHead, &box))
{
@@ -2019,7 +2019,7 @@ WhereDoIGoInTheStack(
* if (pWin == pWin->parent->firstChild)
* return pWin->nextSib;
*/
- return(pFirst);
+ return pFirst;
}
else if (IOverlapAnyWindow(pWin, &box))
return NullWindow;
@@ -2094,10 +2094,10 @@ ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client)
xEvent event;
if ((pWin->drawable.class == InputOnly) && (mask & IllegalInputOnlyConfigureMask))
- return(BadMatch);
+ return BadMatch;
if ((mask & CWSibling) && !(mask & CWStackMode))
- return(BadMatch);
+ return BadMatch;
pVlist = vlist;
@@ -2154,9 +2154,9 @@ ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client)
return rc;
}
if (pSib->parent != pParent)
- return(BadMatch);
+ return BadMatch;
if (pSib == pWin)
- return(BadMatch);
+ return BadMatch;
break;
case CWStackMode:
GET_CARD8(CWStackMode, smode);
@@ -2164,12 +2164,12 @@ ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client)
(smode != Opposite) && (smode != Above) && (smode != Below))
{
client->errorValue = smode;
- return(BadValue);
+ return BadValue;
}
break;
default:
client->errorValue = mask;
- return(BadValue);
+ return BadValue;
}
}
/* root really can't be reconfigured, so just return */
@@ -2217,7 +2217,7 @@ ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client)
event.u.configureRequest.parent = pParent->drawable.id;
if (MaybeDeliverEventsToClient(pParent, &event, 1,
SubstructureRedirectMask, client) == 1)
- return(Success);
+ return Success;
}
if (action == RESIZE_WIN)
{
@@ -2268,7 +2268,7 @@ ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client)
#endif
goto ActuallyDoSomething;
}
- return(Success);
+ return Success;
ActuallyDoSomething:
if (pWin->drawable.pScreen->ConfigNotify)
@@ -2331,7 +2331,7 @@ ActuallyDoSomething:
if (action != RESTACK_WIN)
CheckCursorConfinement(pWin);
- return(Success);
+ return Success;
#undef RESTACK_WIN
#undef MOVE_WIN
#undef RESIZE_WIN
@@ -2392,7 +2392,7 @@ CirculateWindow(WindowPtr pParent, int direction, ClientPtr client)
event.u.u.type = CirculateRequest;
if (MaybeDeliverEventsToClient(pParent, &event, 1,
SubstructureRedirectMask, client) == 1)
- return(Success);
+ return Success;
}
event.u.u.type = CirculateNotify;
@@ -2401,7 +2401,7 @@ CirculateWindow(WindowPtr pParent, int direction, ClientPtr client)
(direction == RaiseLowest) ? pFirst : NullWindow,
VTStack);
- return(Success);
+ return Success;
}
static int
@@ -2412,9 +2412,9 @@ CompareWIDs(
Window *wid = (Window *)value;
if (pWin->drawable.id == *wid)
- return(WT_STOPWALKING);
+ return WT_STOPWALKING;
else
- return(WT_WALKCHILDREN);
+ return WT_WALKCHILDREN;
}
/*****
@@ -2433,9 +2433,9 @@ ReparentWindow(WindowPtr pWin, WindowPtr pParent,
pScreen = pWin->drawable.pScreen;
if (TraverseTree(pWin, CompareWIDs, (pointer)&pParent->drawable.id) == WT_STOPWALKING)
- return(BadMatch);
+ return BadMatch;
if (!MakeWindowOptional(pWin))
- return(BadAlloc);
+ return BadAlloc;
if (WasMapped)
UnmapWindow(pWin, FALSE);
@@ -2511,7 +2511,7 @@ ReparentWindow(WindowPtr pWin, WindowPtr pParent,
if (WasMapped)
MapWindow(pWin, client);
RecalculateDeliverableEvents(pWin);
- return(Success);
+ return Success;
}
static void
@@ -2584,7 +2584,7 @@ MapWindow(WindowPtr pWin, ClientPtr client)
WindowPtr pLayerWin;
if (pWin->mapped)
- return(Success);
+ return Success;
/* general check for permission to map window */
if (XaceHook(XACE_RESOURCE_ACCESS, client, pWin->drawable.id, RT_WINDOW,
@@ -2608,7 +2608,7 @@ MapWindow(WindowPtr pWin, ClientPtr client)
if (MaybeDeliverEventsToClient(pParent, &event, 1,
SubstructureRedirectMask, client) == 1)
- return(Success);
+ return Success;
}
pWin->mapped = TRUE;
@@ -2622,7 +2622,7 @@ MapWindow(WindowPtr pWin, ClientPtr client)
}
if (!pParent->realized)
- return(Success);
+ return Success;
RealizeTree(pWin);
if (pWin->viewable)
{
@@ -2657,7 +2657,7 @@ MapWindow(WindowPtr pWin, ClientPtr client)
RegionUninit(&temp);
}
- return(Success);
+ return Success;
}
@@ -2813,7 +2813,7 @@ UnmapWindow(WindowPtr pWin, Bool fromConfigure)
WindowPtr pLayerWin = pWin;
if ((!pWin->mapped) || (!(pParent = pWin->parent)))
- return(Success);
+ return Success;
if (SubStrSend(pWin, pParent) && MapUnmapEventsEnabled(pWin))
{
memset(&event, 0, sizeof(xEvent));
@@ -2843,7 +2843,7 @@ UnmapWindow(WindowPtr pWin, Bool fromConfigure)
}
if (wasRealized && !fromConfigure)
WindowsRestructured ();
- return(Success);
+ return Success;
}
/*****
@@ -2986,15 +2986,15 @@ PointInWindowIsVisible(WindowPtr pWin, int x, int y)
BoxRec box;
if (!pWin->realized)
- return (FALSE);
+ return FALSE;
if (RegionContainsPoint(&pWin->borderClip,
x, y, &box)
&& (!wInputShape(pWin) ||
RegionContainsPoint(wInputShape(pWin),
x - pWin->drawable.x,
y - pWin->drawable.y, &box)))
- return(TRUE);
- return(FALSE);
+ return TRUE;
+ return FALSE;
}
@@ -3008,7 +3008,7 @@ NotClippedByChildren(WindowPtr pWin)
{
RegionIntersect(pReg, &pWin->borderClip, &pWin->winSize);
}
- return(pReg);
+ return pReg;
}
void
diff --git a/fb/fbcmap.c b/fb/fbcmap.c
index 02b7268..3251a4c 100644
--- a/fb/fbcmap.c
+++ b/fb/fbcmap.c
@@ -48,7 +48,7 @@ fbListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps)
/* By the time we are processing requests, we can guarantee that there
* is always a colormap installed */
*pmaps = GetInstalledColormap(pScreen)->mid;
- return (1);
+ return 1;
}
diff --git a/fb/fbpixmap.c b/fb/fbpixmap.c
index 15eedcd..41b12ce 100644
--- a/fb/fbpixmap.c
+++ b/fb/fbpixmap.c
@@ -318,7 +318,7 @@ fbPixmapToRegion(PixmapPtr pPix)
if (!RegionIsValid(pReg))
FatalError("Assertion failed file %s, line %d: expr\n", __FILE__, __LINE__);
#endif
- return(pReg);
+ return pReg;
}
#ifdef FB_DEBUG
diff --git a/fb/fbscreen.c b/fb/fbscreen.c
index f4311ae..2502efe 100644
--- a/fb/fbscreen.c
+++ b/fb/fbscreen.c
@@ -43,13 +43,13 @@ fbCloseScreen (int index, ScreenPtr pScreen)
Bool
fbRealizeFont(ScreenPtr pScreen, FontPtr pFont)
{
- return (TRUE);
+ return TRUE;
}
Bool
fbUnrealizeFont(ScreenPtr pScreen, FontPtr pFont)
{
- return (TRUE);
+ return TRUE;
}
void
diff --git a/glx/singlesize.c b/glx/singlesize.c
index 9e95dd3..6149b61 100644
--- a/glx/singlesize.c
+++ b/glx/singlesize.c
@@ -77,7 +77,7 @@ GLint __glGetMap_size(GLenum target, GLenum query)
/*
** The query above might fail, but then order will be zero anyway.
*/
- return (order * k);
+ return order * k;
case GL_DOMAIN:
return 2;
case GL_ORDER:
@@ -101,7 +101,7 @@ GLint __glGetMap_size(GLenum target, GLenum query)
/*
** The query above might fail, but then majorMinor will be zeroes
*/
- return (majorMinor[0] * majorMinor[1] * k);
+ return majorMinor[0] * majorMinor[1] * k;
case GL_DOMAIN:
return 4;
case GL_ORDER:
diff --git a/hw/dmx/dmx_glxvisuals.c b/hw/dmx/dmx_glxvisuals.c
index 59173ca..f0050c2 100644
--- a/hw/dmx/dmx_glxvisuals.c
+++ b/hw/dmx/dmx_glxvisuals.c
@@ -51,7 +51,7 @@ __GLXvisualConfig *GetGLXVisualConfigs(Display *dpy, int screen, int *nconfigs)
int num_good_visuals;
if (!XQueryExtension(dpy, "GLX", &majorOpcode, &dummy, &dummy)) {
- return(NULL);
+ return NULL;
}
/* Send the glXGetVisualConfigs request */
@@ -228,7 +228,7 @@ __GLXvisualConfig *GetGLXVisualConfigs(Display *dpy, int screen, int *nconfigs)
SyncHandle();
*nconfigs = nvisuals;
- return( configs );
+ return configs;
}
@@ -500,7 +500,7 @@ GetGLXVisualConfigsFromFBConfigs(__GLXFBConfig *fbconfigs, int nfbconfigs,
__GLXvisualConfig *configs = NULL;
int i;
- if (!fbconfigs || !nfbconfigs || !nconfigs) return(NULL);
+ if (!fbconfigs || !nfbconfigs || !nconfigs) return NULL;
*nconfigs = 0;
/* Allocate memory for our config structure */
@@ -596,6 +596,6 @@ GetGLXVisualConfigsFromFBConfigs(__GLXFBConfig *fbconfigs, int nfbconfigs,
}
}
- return( configs );
+ return configs;
}
diff --git a/hw/dmx/dmxcmap.c b/hw/dmx/dmxcmap.c
index e3d2fdc..ca9ef1f 100644
--- a/hw/dmx/dmxcmap.c
+++ b/hw/dmx/dmxcmap.c
@@ -75,7 +75,7 @@ Bool dmxBECreateColormap(ColormapPtr pColormap)
visual,
(pVisual->class & DynamicClass ?
AllocAll : AllocNone));
- return (pCmapPriv->cmap != 0);
+ return pCmapPriv->cmap != 0;
}
else {
dmxLog(dmxWarning, "dmxBECreateColormap: No visual found\n");
diff --git a/hw/dmx/dmxfont.c b/hw/dmx/dmxfont.c
index 7a418c8..34161f2 100644
--- a/hw/dmx/dmxfont.c
+++ b/hw/dmx/dmxfont.c
@@ -108,7 +108,7 @@ static Bool dmxCheckFontPathElement(DMXScreenInfo *dmxScreen, char *fp)
dmxSync(dmxScreen, TRUE); /* Must complete before removing handler */
XSetErrorHandler(oldErrorHandler);
- return (dmxFontLastError == 0);
+ return dmxFontLastError == 0;
}
static int dmxSetFontPath(DMXScreenInfo *dmxScreen)
diff --git a/hw/dmx/dmxinit.c b/hw/dmx/dmxinit.c
index 7cd50da..0755532 100644
--- a/hw/dmx/dmxinit.c
+++ b/hw/dmx/dmxinit.c
@@ -404,7 +404,7 @@ Bool dmxGetVisualInfo(DMXScreenInfo *dmxScreen)
dmxLogVisual(dmxScreen, &dmxScreen->beVisuals[i],
(i == dmxScreen->beDefVisualIndex));
- return (dmxScreen->beDefVisualIndex >= 0);
+ return dmxScreen->beDefVisualIndex >= 0;
}
void dmxGetColormaps(DMXScreenInfo *dmxScreen)
diff --git a/hw/dmx/dmxpixmap.c b/hw/dmx/dmxpixmap.c
index 587a27d..81b7115 100644
--- a/hw/dmx/dmxpixmap.c
+++ b/hw/dmx/dmxpixmap.c
@@ -247,5 +247,5 @@ RegionPtr dmxBitmapToRegion(PixmapPtr pPixmap)
RegionValidate(pReg, &overlap);
dmxSync(dmxScreen, FALSE);
- return(pReg);
+ return pReg;
}
diff --git a/hw/dmx/glxProxy/compsize.c b/hw/dmx/glxProxy/compsize.c
index cae8fea..9a40d65 100644
--- a/hw/dmx/glxProxy/compsize.c
+++ b/hw/dmx/glxProxy/compsize.c
@@ -145,7 +145,7 @@ GLint __glDrawPixels_size(GLenum format, GLenum type, GLsizei w, GLsizei h)
default:
return 0;
}
- return (elements * esize * w * h);
+ return elements * esize * w * h;
}
GLint __glBitmap_size(GLsizei w, GLsizei h)
@@ -294,7 +294,7 @@ GLint __glTexImage1D_size(GLenum format, GLenum type, GLsizei w)
default:
return 0;
}
- return (elements * esize * w);
+ return elements * esize * w;
}
GLint __glTexImage2D_size(GLenum format, GLenum type, GLsizei w, GLsizei h)
@@ -371,7 +371,7 @@ GLint __glTexImage2D_size(GLenum format, GLenum type, GLsizei w, GLsizei h)
default:
return 0;
}
- return (elements * esize * w * h);
+ return elements * esize * w * h;
}
GLint __glTexImage3D_size(GLenum format, GLenum type, GLsizei w, GLsizei h,
@@ -450,7 +450,7 @@ GLint __glTexImage3D_size(GLenum format, GLenum type, GLsizei w, GLsizei h,
default:
return 0;
}
- return (elements * esize * w * h * d);
+ return elements * esize * w * h * d;
}
GLint __glLightfv_size(GLenum pname)
diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c
index c559ce7..88cf901 100644
--- a/hw/dmx/glxProxy/glxcmds.c
+++ b/hw/dmx/glxProxy/glxcmds.c
@@ -80,7 +80,7 @@ Display *GetBackEndDisplay( __GLXclientState *cl, int s )
if (! cl->be_displays[s] ) {
cl->be_displays[s] = XOpenDisplay( DisplayString(dmxScreens[s].beDisplay) );
}
- return( cl->be_displays[s] );
+ return cl->be_displays[s];
}
/*
@@ -628,7 +628,7 @@ int GetCurrentBackEndTag(__GLXclientState *cl, GLXContextTag tag, int s)
return( cl->be_currentCTag[ (tag-1)*screenInfo.numScreens + s ] );
}
else {
- return( 0 );
+ return 0;
}
}
diff --git a/hw/dmx/glxProxy/glxfbconfig.c b/hw/dmx/glxProxy/glxfbconfig.c
index c721fdd..a7741ff 100644
--- a/hw/dmx/glxProxy/glxfbconfig.c
+++ b/hw/dmx/glxProxy/glxfbconfig.c
@@ -90,7 +90,7 @@ int AreFBConfigsMatch( __GLXFBConfig *c1, __GLXFBConfig *c2 )
(c1->maxAlpha == c2->maxAlpha)
);
- return( match );
+ return match;
}
__GLXFBConfig *FindMatchingFBConfig( __GLXFBConfig *c, __GLXFBConfig *configs, int nconfigs )
@@ -99,8 +99,8 @@ __GLXFBConfig *FindMatchingFBConfig( __GLXFBConfig *c, __GLXFBConfig *configs, i
for (i=0; i<nconfigs; i++) {
if ( AreFBConfigsMatch( c, configs + i ) )
- return( configs + i );
+ return configs + i;
}
- return(0);
+ return 0;
}
diff --git a/hw/dmx/glxProxy/glxscreens.c b/hw/dmx/glxProxy/glxscreens.c
index 0298435..a0e8bea 100644
--- a/hw/dmx/glxProxy/glxscreens.c
+++ b/hw/dmx/glxProxy/glxscreens.c
@@ -327,7 +327,7 @@ char *__glXGetServerString( unsigned int name )
break;
}
- return( ret );
+ return ret;
}
@@ -338,10 +338,10 @@ __GLXFBConfig *glxLookupFBConfig( GLXFBConfigID id )
for (i=0, j=0; i<__glXNumFBConfigs; i++,j+=(__glXNumActiveScreens+1) ) {
if ( __glXFBConfigs[j]->id == id)
- return( __glXFBConfigs[j] );
+ return __glXFBConfigs[j];
}
- return(NULL);
+ return NULL;
}
__GLXFBConfig *glxLookupFBConfigByVID( VisualID vid )
@@ -350,10 +350,10 @@ __GLXFBConfig *glxLookupFBConfigByVID( VisualID vid )
for (i=0, j=0; i<__glXNumFBConfigs; i++,j+=(__glXNumActiveScreens+1) ) {
if ( __glXFBConfigs[j]->associatedVisualId == vid)
- return( __glXFBConfigs[j] );
+ return __glXFBConfigs[j];
}
- return(NULL);
+ return NULL;
}
__GLXFBConfig *glxLookupBackEndFBConfig( GLXFBConfigID id, int screen )
@@ -363,10 +363,10 @@ __GLXFBConfig *glxLookupBackEndFBConfig( GLXFBConfigID id, int screen )
for (i=0, j=0; i<__glXNumFBConfigs; i++,j+=(__glXNumActiveScreens+1) ) {
if ( __glXFBConfigs[j]->id == id)
- return( __glXFBConfigs[j+screen+1] );
+ return __glXFBConfigs[j+screen+1];
}
- return(NULL);
+ return NULL;
}
diff --git a/hw/dmx/glxProxy/glxsingle.c b/hw/dmx/glxProxy/glxsingle.c
index 7a732cc..a7ed574 100644
--- a/hw/dmx/glxProxy/glxsingle.c
+++ b/hw/dmx/glxProxy/glxsingle.c
@@ -668,7 +668,7 @@ static GLint __glReadPixels_size(GLenum format, GLenum type, GLint w, GLint h,
}
if (elementbits_return) *elementbits_return = elements;
if (rowbytes_return) *rowbytes_return = rowsize;
- return (rowsize * h);
+ return rowsize * h;
} else {
return -1;
}
@@ -718,7 +718,7 @@ static GLint __glReadPixels_size(GLenum format, GLenum type, GLint w, GLint h,
if (elementbits_return) *elementbits_return = esize*elements*8;
if (rowbytes_return) *rowbytes_return = rowsize;
- return (rowsize * h);
+ return rowsize * h;
}
static int intersectRect( int x1, int x2, int y1, int y2,
@@ -734,14 +734,14 @@ static int intersectRect( int x1, int x2, int y1, int y2,
if ( (width <= 0) || (height <= 0) ) {
*ix1 = *ix2 = *iy1 = *iy2 = 0;
- return(0);
+ return 0;
}
else {
*ix1 = left;
*ix2 = right;
*iy1 = top;
*iy2 = bottom;
- return( width * height );
+ return width * height;
}
}
@@ -811,7 +811,7 @@ int __glXDisp_ReadPixels(__GLXclientState *cl, GLbyte *pc)
if (buf_size > 0) {
buf = (char *) malloc( buf_size );
if ( !buf ) {
- return( BadAlloc );
+ return BadAlloc;
}
}
else {
diff --git a/hw/dmx/glxProxy/glxvisuals.c b/hw/dmx/glxProxy/glxvisuals.c
index 4c64db2..d738ec2 100644
--- a/hw/dmx/glxProxy/glxvisuals.c
+++ b/hw/dmx/glxProxy/glxvisuals.c
@@ -77,11 +77,11 @@ int glxVisualsMatch( __GLXvisualConfig *v1, __GLXvisualConfig *v2 )
(v1->nMultiSampleBuffers == v2->nMultiSampleBuffers) &&
(v1->visualSelectGroup == v2->visualSelectGroup) ) {
- return(1);
+ return 1;
}
- return(0);
+ return 0;
}
@@ -93,12 +93,12 @@ VisualID glxMatchGLXVisualInConfigList( __GLXvisualConfig *pGlxVisual, __GLXvisu
if (glxVisualsMatch( pGlxVisual, &configs[i] )) {
- return( configs[i].vid );
+ return configs[i].vid;
}
}
- return(0);
+ return 0;
}
VisualID glxMatchVisualInConfigList( ScreenPtr pScreen, VisualPtr pVisual, __GLXvisualConfig *configs, int nconfigs )
@@ -109,7 +109,7 @@ VisualID glxMatchVisualInConfigList( ScreenPtr pScreen, VisualPtr pVisual, __GLX
/* check that the glx extension has been initialized */
if ( !__glXActiveScreens )
- return(0);
+ return 0;
pGlxScreen = &__glXActiveScreens[pScreen->myNum];
pGlxVisual = pGlxScreen->pGlxVisual;
@@ -124,7 +124,7 @@ VisualID glxMatchVisualInConfigList( ScreenPtr pScreen, VisualPtr pVisual, __GLX
/*
* the visual is not supported by glx
*/
- return(0);
+ return 0;
}
return( glxMatchGLXVisualInConfigList(pGlxVisual, configs, nconfigs) );
@@ -151,12 +151,12 @@ VisualPtr glxMatchVisual( ScreenPtr pScreen, VisualPtr pVisual, ScreenPtr pMatch
*/
for (j=0; j<pMatchScreen->numVisuals; j++) {
if (vid == pMatchScreen->visuals[j].vid) {
- return( &pMatchScreen->visuals[j] );
+ return &pMatchScreen->visuals[j];
}
}
}
- return(0);
+ return 0;
}
void glxSetVisualConfigs(int nconfigs, __GLXvisualConfig *configs,
@@ -198,7 +198,7 @@ static VisualID FindClosestVisual( VisualPtr pVisual, int rootDepth,
while( pdepth[d].vids[v] != vis->vid ) vis++;
if (vis->class == pVisual->class) {
- return( pdepth[d].vids[v] );
+ return pdepth[d].vids[v];
}
}
}
@@ -216,7 +216,7 @@ static VisualID FindClosestVisual( VisualPtr pVisual, int rootDepth,
while( pdepth[d].vids[v] != vis->vid ) vis++;
if (vis->class == pVisual->class) {
- return( pdepth[d].vids[v] );
+ return pdepth[d].vids[v];
}
}
}
@@ -224,7 +224,7 @@ static VisualID FindClosestVisual( VisualPtr pVisual, int rootDepth,
/*
* if not found - just take the first visual
*/
- return( pdepth[0].vids[0] );
+ return pdepth[0].vids[0];
}
Bool glxInitVisuals(int *nvisualp, VisualPtr *visualp,
diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c
index d546370..38ee06d 100644
--- a/hw/kdrive/ephyr/hostx.c
+++ b/hw/kdrive/ephyr/hostx.c
@@ -532,7 +532,7 @@ hostx_get_server_depth (EphyrScreenInfo screen)
{
struct EphyrHostScreen *host_screen = host_screen_from_screen_info (screen);
- return (host_screen ? host_screen->server_depth : 0);
+ return host_screen ? host_screen->server_depth : 0;
}
void
diff --git a/hw/kdrive/src/kxv.c b/hw/kdrive/src/kxv.c
index 3af6acf..c07829a 100644
--- a/hw/kdrive/src/kxv.c
+++ b/hw/kdrive/src/kxv.c
@@ -1173,7 +1173,7 @@ KdXVQueryAdaptors(
*p_nAdaptors = pxvs->nAdaptors;
*p_pAdaptors = pxvs->pAdaptors;
- return (Success);
+ return Success;
}
static Bool
diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c
index be8c036..e109734 100644
--- a/hw/vfb/InitOutput.c
+++ b/hw/vfb/InitOutput.c
@@ -401,7 +401,7 @@ vfbListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps)
/* By the time we are processing requests, we can guarantee that there
* is always a colormap installed */
*pmaps = GetInstalledColormap(pScreen)->mid;
- return (1);
+ return 1;
}
diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c
index 167bc78..200cb8f 100644
--- a/hw/xfree86/common/xf86AutoConfig.c
+++ b/hw/xfree86/common/xf86AutoConfig.c
@@ -185,7 +185,7 @@ xf86AutoConfig(void)
if (ret != CONFIG_OK)
xf86Msg(X_ERROR, "Error parsing the built-in default configuration.\n");
- return (ret == CONFIG_OK);
+ return ret == CONFIG_OK;
}
static void
diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
index 7876ba9..90c1914 100644
--- a/hw/xfree86/common/xf86Bus.c
+++ b/hw/xfree86/common/xf86Bus.c
@@ -245,7 +245,7 @@ xf86AllocateEntity(void)
xf86Entities[xf86NumEntities - 1] = xnfcalloc(1,sizeof(EntityRec));
xf86Entities[xf86NumEntities - 1]->entityPrivates =
xnfcalloc(sizeof(DevUnion) * xf86EntityPrivateCount, 1);
- return (xf86NumEntities - 1);
+ return xf86NumEntities - 1;
}
Bool
@@ -257,9 +257,9 @@ xf86IsEntityPrimary(int entityIndex)
switch (pEnt->bus.type) {
case BUS_PCI:
- return (pEnt->bus.id.pci == primaryBus.id.pci);
+ return pEnt->bus.id.pci == primaryBus.id.pci;
case BUS_SBUS:
- return (pEnt->bus.id.sbus.fbNum == primaryBus.id.sbus.fbNum);
+ return pEnt->bus.id.sbus.fbNum == primaryBus.id.sbus.fbNum;
default:
return FALSE;
}
@@ -342,7 +342,7 @@ xf86FindScreenForEntity(int entityIndex)
for (i = 0; i < xf86NumScreens; i++) {
for (j = 0; j < xf86Screens[i]->numEntities; j++) {
if ( xf86Screens[i]->entityList[j] == entityIndex )
- return (xf86Screens[i]);
+ return xf86Screens[i];
}
}
}
@@ -557,7 +557,7 @@ int
xf86GetLastScrnFlag(int entityIndex)
{
if(entityIndex < xf86NumEntities) {
- return(xf86Entities[entityIndex]->lastScrnFlag);
+ return xf86Entities[entityIndex]->lastScrnFlag;
} else {
return -1;
}
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index c7a68e5..28786ba 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -163,7 +163,7 @@ xf86GetPathElem(char **pnt)
**pnt = '\0';
*pnt += 1;
}
- return(p1);
+ return p1;
}
/*
@@ -239,7 +239,7 @@ xf86ValidateFontPath(char *path)
strcat(out_pnt, path_elem);
out_pnt += strlen(path_elem);
}
- return(tmp_path);
+ return tmp_path;
}
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 394fb06..cd48914 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -1360,7 +1360,7 @@ xf86TokenToString(SymTabPtr table, int token)
if (table[i].token < 0)
return NULL;
else
- return(table[i].name);
+ return table[i].name;
}
int
@@ -1374,7 +1374,7 @@ xf86StringToToken(SymTabPtr table, const char *string)
for (i = 0; table[i].token >= 0 && xf86NameCmp(string, table[i].name); i++)
;
- return(table[i].token);
+ return table[i].token;
}
/*
@@ -1993,7 +1993,7 @@ xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type,
ScrnIndex, property, type, format, len, value);
if (ScrnIndex<0 || ScrnIndex>=xf86NumScreens) {
- return(BadMatch);
+ return BadMatch;
}
if (xf86RegisteredPropertiesTable &&
@@ -2007,7 +2007,7 @@ xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type,
if (!pNewProp) {
if ((pNewProp = (RootWinPropPtr)malloc(sizeof(RootWinProp))) == NULL) {
- return(BadAlloc);
+ return BadAlloc;
}
/*
* We will put this property at the end of the list so that
@@ -2031,7 +2031,7 @@ xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type,
DebugF("creating xf86RegisteredPropertiesTable[] size %d\n",
xf86NumScreens);
if ( NULL==(xf86RegisteredPropertiesTable=(RootWinPropPtr*)xnfcalloc(sizeof(RootWinProp),xf86NumScreens) )) {
- return(BadAlloc);
+ return BadAlloc;
}
for (i=0; i<xf86NumScreens; i++) {
xf86RegisteredPropertiesTable[i] = NULL;
@@ -2056,7 +2056,7 @@ xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type,
}
}
DebugF("xf86RegisterRootWindowProperty succeeded\n");
- return(Success);
+ return Success;
}
Bool
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 98bbd5d..ca532ee 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -294,7 +294,7 @@ xf86CreateRootWindow(WindowPtr pWin)
}
DebugF("xf86CreateRootWindow() returns %d\n", ret);
- return (ret);
+ return ret;
}
diff --git a/hw/xfree86/common/xf86Option.c b/hw/xfree86/common/xf86Option.c
index a6596f0..aa6ea30 100644
--- a/hw/xfree86/common/xf86Option.c
+++ b/hw/xfree86/common/xf86Option.c
@@ -745,7 +745,7 @@ xf86IsOptionSet(const OptionInfoRec *table, int token)
OptionInfoPtr p;
p = xf86TokenToOptinfo(table, token);
- return (p && p->found);
+ return p && p->found;
}
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index d4afd16..ca954a3 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -278,9 +278,9 @@ xf86SendDragEvents(DeviceIntPtr device)
LocalDevicePtr local = (LocalDevicePtr) device->public.devicePrivate;
if (device->button && device->button->buttonsDown > 0)
- return (local->flags & XI86_SEND_DRAG_EVENTS);
+ return local->flags & XI86_SEND_DRAG_EVENTS;
else
- return (TRUE);
+ return TRUE;
}
/***********************************************************************
@@ -1193,7 +1193,7 @@ xf86ScaleAxis(int Cx,
if (X < Sxlow)
X = Sxlow;
- return (X);
+ return X;
}
/*
diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
index 184f221..1517951 100644
--- a/hw/xfree86/common/xf86pciBus.c
+++ b/hw/xfree86/common/xf86pciBus.c
@@ -465,7 +465,7 @@ xf86PciAddMatchingDev(DriverPtr drvp)
pci_iterator_destroy(iter);
- return (numFound != 0);
+ return numFound != 0;
}
Bool
diff --git a/hw/xfree86/common/xf86sbusBus.c b/hw/xfree86/common/xf86sbusBus.c
index 30a4202..fe3f0a8 100644
--- a/hw/xfree86/common/xf86sbusBus.c
+++ b/hw/xfree86/common/xf86sbusBus.c
@@ -530,7 +530,7 @@ xf86GetSbusInfoForEntity(int entityIndex)
for (psdpp = xf86SbusInfo; *psdpp != NULL; psdpp++) {
if (p->bus.id.sbus.fbNum == (*psdpp)->fbNum)
- return (*psdpp);
+ return *psdpp;
}
return NULL;
}
diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c
index 3d5d9a6..948f82d 100644
--- a/hw/xfree86/common/xf86xv.c
+++ b/hw/xfree86/common/xf86xv.c
@@ -1220,7 +1220,7 @@ xf86XVQueryAdaptors(
*p_nAdaptors = pxvs->nAdaptors;
*p_pAdaptors = pxvs->pAdaptors;
- return (Success);
+ return Success;
}
diff --git a/hw/xfree86/common/xisb.c b/hw/xfree86/common/xisb.c
index 4455efd..e4c8bf2 100644
--- a/hw/xfree86/common/xisb.c
+++ b/hw/xfree86/common/xisb.c
@@ -69,12 +69,12 @@ XisbNew (int fd, ssize_t size)
b = malloc(sizeof (XISBuffer));
if (!b)
- return (NULL);
+ return NULL;
b->buf = malloc((sizeof (unsigned char) * size));
if (!b->buf)
{
free(b);
- return (NULL);
+ return NULL;
}
b->fd = fd;
@@ -83,7 +83,7 @@ XisbNew (int fd, ssize_t size)
b->current = 1; /* force it to be past the end to trigger initial read */
b->end = 0;
b->buffer_size = size;
- return (b);
+ return b;
}
void
@@ -103,7 +103,7 @@ XisbRead (XISBuffer *b)
if (b->block_duration >= 0)
{
if (xf86WaitForInput (b->fd, b->block_duration) < 1)
- return (-1);
+ return -1;
}
else
{
@@ -119,9 +119,9 @@ XisbRead (XISBuffer *b)
switch (ret)
{
case 0:
- return (-1); /* timeout */
+ return -1; /* timeout */
case -1:
- return (-2); /* error */
+ return -2; /* error */
default:
b->end = ret;
b->current = 0;
@@ -132,7 +132,7 @@ XisbRead (XISBuffer *b)
ErrorF ("read 0x%02x (%c)\n", b->buf[b->current],
isprint(b->buf[b->current])?b->buf[b->current]:'.');
- return (b->buf[b->current++]);
+ return b->buf[b->current++];
}
/* the only purpose of this function is to provide output tracing */
diff --git a/hw/xfree86/ddc/ddc.c b/hw/xfree86/ddc/ddc.c
index e64e2f3..7379e95 100644
--- a/hw/xfree86/ddc/ddc.c
+++ b/hw/xfree86/ddc/ddc.c
@@ -53,8 +53,8 @@ find_start(unsigned int *ptr)
}
}
for (i=0;i<9;i++)
- if (test[i]) return (i+1);
- return (-1);
+ if (test[i]) return i+1;
+ return -1;
}
static unsigned char *
@@ -75,8 +75,8 @@ find_header(unsigned char *block)
if (i==8) break;
ptr++;
}
- if (ptr == end) return (NULL);
- return (ptr);
+ if (ptr == end) return NULL;
+ return ptr;
}
static unsigned char *
@@ -98,7 +98,7 @@ resort(unsigned char *s_block)
if (s_ptr == s_end) s_ptr = s_block;
}
free(s_block);
- return (d_new);
+ return d_new;
}
static int
@@ -120,7 +120,7 @@ DDC_checksum(unsigned char *block, int len)
/* catch the trivial case where all bytes are 0 */
if (!not_null) return 1;
- return (result&0xFF);
+ return result&0xFF;
}
static unsigned char *
@@ -169,7 +169,7 @@ FetchEDID_DDC1(register ScrnInfoPtr pScrn,
*xp = read_DDC(pScrn);
xp++;
} while(--count);
- return (ptr);
+ return ptr;
}
/* test if DDC1 return 0 if not */
@@ -184,7 +184,7 @@ TestDDC1(ScrnInfoPtr pScrn, unsigned int (*read_DDC)(ScrnInfoPtr))
/* wait for next retrace */
if (old != read_DDC(pScrn)) break;
} while(count--);
- return (count);
+ return count;
}
/*
diff --git a/hw/xfree86/ddc/interpret_edid.c b/hw/xfree86/ddc/interpret_edid.c
index d63e25d..acb7efa 100644
--- a/hw/xfree86/ddc/interpret_edid.c
+++ b/hw/xfree86/ddc/interpret_edid.c
@@ -183,7 +183,7 @@ xf86InterpretEDID(int scrnIndex, Uchar *block)
handle_edid_quirks(m);
encode_aspect_ratio(m);
- return (m);
+ return m;
error:
free(m);
diff --git a/hw/xfree86/dixmods/extmod/xf86dga2.c b/hw/xfree86/dixmods/extmod/xf86dga2.c
index 203fccf..e522b5c 100644
--- a/hw/xfree86/dixmods/extmod/xf86dga2.c
+++ b/hw/xfree86/dixmods/extmod/xf86dga2.c
@@ -692,10 +692,10 @@ ProcXF86DGAGetVideoLL(ClientPtr client)
rep.sequenceNumber = client->sequence;
if(!DGAAvailable(stuff->screen))
- return (DGAErrorBase + XF86DGANoDirectVideoMode);
+ return DGAErrorBase + XF86DGANoDirectVideoMode;
if(!(num = DGAGetOldDGAMode(stuff->screen)))
- return (DGAErrorBase + XF86DGANoDirectVideoMode);
+ return DGAErrorBase + XF86DGANoDirectVideoMode;
/* get the parameters for the mode that best matches */
DGAGetModeInfo(stuff->screen, &mode, num);
@@ -736,12 +736,12 @@ ProcXF86DGADirectVideo(ClientPtr client)
if (stuff->enable & XF86DGADirectGraphics) {
if(!(num = DGAGetOldDGAMode(stuff->screen)))
- return (DGAErrorBase + XF86DGANoDirectVideoMode);
+ return DGAErrorBase + XF86DGANoDirectVideoMode;
} else
num = 0;
if(Success != DGASetMode(stuff->screen, num, &mode, &pix))
- return (DGAErrorBase + XF86DGAScreenNotActive);
+ return DGAErrorBase + XF86DGAScreenNotActive;
DGASetInputMode (stuff->screen,
(stuff->enable & XF86DGADirectKeyb) != 0,
@@ -785,10 +785,10 @@ ProcXF86DGAGetViewPortSize(ClientPtr client)
rep.sequenceNumber = client->sequence;
if (!DGAAvailable(stuff->screen))
- return (DGAErrorBase + XF86DGANoDirectVideoMode);
+ return DGAErrorBase + XF86DGANoDirectVideoMode;
if(!(num = DGAGetOldDGAMode(stuff->screen)))
- return (DGAErrorBase + XF86DGANoDirectVideoMode);
+ return DGAErrorBase + XF86DGANoDirectVideoMode;
DGAGetModeInfo(stuff->screen, &mode, num);
@@ -813,7 +813,7 @@ ProcXF86DGASetViewPort(ClientPtr client)
REQUEST_SIZE_MATCH(xXF86DGASetViewPortReq);
if (!DGAAvailable(stuff->screen))
- return (DGAErrorBase + XF86DGANoDirectVideoMode);
+ return DGAErrorBase + XF86DGANoDirectVideoMode;
if (!DGAActive(stuff->screen))
return DGAErrorBase + XF86DGADirectNotActivated;
@@ -877,7 +877,7 @@ ProcXF86DGAInstallColormap(ClientPtr client)
REQUEST_SIZE_MATCH(xXF86DGAInstallColormapReq);
if (!DGAActive(stuff->screen))
- return (DGAErrorBase + XF86DGADirectNotActivated);
+ return DGAErrorBase + XF86DGADirectNotActivated;
rc = dixLookupResourceByType((pointer *)&pcmp, stuff->id, RT_COLORMAP,
client, DixInstallAccess);
@@ -926,7 +926,7 @@ ProcXF86DGAViewPortChanged(ClientPtr client)
REQUEST_SIZE_MATCH(xXF86DGAViewPortChangedReq);
if (!DGAActive(stuff->screen))
- return (DGAErrorBase + XF86DGADirectNotActivated);
+ return DGAErrorBase + XF86DGADirectNotActivated;
rep.type = X_Reply;
rep.length = 0;
diff --git a/hw/xfree86/dixmods/extmod/xf86vmode.c b/hw/xfree86/dixmods/extmod/xf86vmode.c
index 3631369..0001c9e 100644
--- a/hw/xfree86/dixmods/extmod/xf86vmode.c
+++ b/hw/xfree86/dixmods/extmod/xf86vmode.c
@@ -520,7 +520,7 @@ ProcXF86VidModeGetAllModeLines(ClientPtr client)
modecount = VidModeGetNumOfModes(stuff->screen);
if (modecount < 1)
- return (VidModeErrorBase + XF86VidModeExtensionDisabled);
+ return VidModeErrorBase + XF86VidModeExtensionDisabled;
if (!VidModeGetFirstModeline(stuff->screen, &mode, &dotClock))
return BadValue;
diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index baa6706..f8025da 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -949,7 +949,7 @@ DRI2HasSwapControl(ScreenPtr pScreen)
{
DRI2ScreenPtr ds = DRI2GetScreen(pScreen);
- return (ds->ScheduleSwap && ds->GetMSC);
+ return ds->ScheduleSwap && ds->GetMSC;
}
Bool
diff --git a/hw/xfree86/loader/loadext.c b/hw/xfree86/loader/loadext.c
index 8ac50a6..4078b77 100644
--- a/hw/xfree86/loader/loadext.c
+++ b/hw/xfree86/loader/loadext.c
@@ -163,7 +163,7 @@ get_node(const char *name)
for (n = graph; n && n->n_name && strcmp(n->n_name, name);
n = n->n_next) ;
if (n)
- return (n);
+ return n;
n = xnfalloc(sizeof(NODE));
@@ -180,7 +180,7 @@ get_node(const char *name)
n->n_prevp = &graph;
graph = n;
- return (n);
+ return n;
}
/*
@@ -285,7 +285,7 @@ find_cycle(NODE * from, NODE * to, int longest_len, int depth)
* to be acyclic
*/
if (from->n_flags & (NF_NODEST | NF_MARK | NF_ACYCLIC))
- return (0);
+ return 0;
from->n_flags |= NF_MARK;
for (np = from->n_arcs, i = from->n_narcs; --i >= 0; np++) {
@@ -317,7 +317,7 @@ find_cycle(NODE * from, NODE * to, int longest_len, int depth)
}
}
from->n_flags &= ~NF_MARK;
- return (longest_len);
+ return longest_len;
}
/* do topological sort on graph */
diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
index ae74164..615e8c6 100644
--- a/hw/xfree86/loader/loadmod.c
+++ b/hw/xfree86/loader/loadmod.c
@@ -114,7 +114,7 @@ static char **defaultPathList = NULL;
static Bool
PathIsAbsolute(const char *path)
{
- return (*path == '/');
+ return *path == '/';
}
/*
@@ -739,7 +739,7 @@ static ModuleDescPtr
AddSibling(ModuleDescPtr head, ModuleDescPtr new)
{
new->sib = head;
- return (new);
+ return new;
}
pointer
@@ -789,7 +789,7 @@ NewModuleDesc(const char *name)
mdp->TearDownData = NULL;
}
- return (mdp);
+ return mdp;
}
ModuleDescPtr
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 304d503..d61a570 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -577,7 +577,7 @@ xf86OutputInitialRotation (xf86OutputPtr output)
for (i = 0; i < 4; i++)
if (xf86nameCompare (direction[i], rotate_name) == 0)
- return (1 << i);
+ return 1 << i;
return RR_Rotate_0;
}
@@ -2201,7 +2201,7 @@ xf86TargetFallback(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
target_rotation, width, height);
}
- return (target_mode != NULL);
+ return target_mode != NULL;
}
static Bool
@@ -3220,7 +3220,7 @@ xf86_crtc_supports_gamma(ScrnInfoPtr pScrn)
return FALSE;
crtc = xf86_config->crtc[0];
- return (crtc->funcs->gamma_set != NULL);
+ return crtc->funcs->gamma_set != NULL;
}
return FALSE;
diff --git a/hw/xfree86/os-support/bsd/alpha_video.c b/hw/xfree86/os-support/bsd/alpha_video.c
index 18e1e0b..bb3a5cb 100644
--- a/hw/xfree86/os-support/bsd/alpha_video.c
+++ b/hw/xfree86/os-support/bsd/alpha_video.c
@@ -328,7 +328,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
"xf86MapVidMem", DEV_MEM, Size, Base,
strerror(errno));
}
- return(base);
+ return base;
}
/* else, mmap /dev/vga */
@@ -347,7 +347,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
FatalError("xf86MapVidMem: Could not mmap /dev/vga (%s)\n",
strerror(errno));
}
- return(base);
+ return base;
}
static void
@@ -370,7 +370,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
checkDevMem(TRUE);
if (devMemFd == -1) {
- return(-1);
+ return -1;
}
psize = getpagesize();
@@ -384,7 +384,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
xf86Msg(X_WARNING,
"xf86ReadBIOS: %s mmap[s=%x,a=%lx,o=%lx] failed (%s)\n",
DEV_MEM, Len, Base, Offset, strerror(errno));
- return(-1);
+ return -1;
}
#ifdef DEBUG
xf86MsgVerb(X_INFO, 3, "xf86ReadBIOS: BIOS at 0x%08x has signature 0x%04x\n",
@@ -397,7 +397,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
"-> %02x %02x %02x %02x...\n",
Base, Offset, Len, Buf[0], Buf[1], Buf[2], Buf[3]);
#endif
- return(Len);
+ return Len;
}
diff --git a/hw/xfree86/os-support/bsd/arm_video.c b/hw/xfree86/os-support/bsd/arm_video.c
index 466a8a0..482d53f 100644
--- a/hw/xfree86/os-support/bsd/arm_video.c
+++ b/hw/xfree86/os-support/bsd/arm_video.c
@@ -201,7 +201,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
"xf86MapVidMem", DEV_MEM, Size, Base,
strerror(errno));
}
- return(base);
+ return base;
}
/* else, mmap /dev/vga */
@@ -220,7 +220,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
FatalError("xf86MapVidMem: Could not mmap /dev/vga (%s)\n",
strerror(errno));
}
- return(base);
+ return base;
}
static void
@@ -243,7 +243,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
checkDevMem(TRUE);
if (devMemFd == -1) {
- return(-1);
+ return -1;
}
psize = getpagesize();
@@ -257,7 +257,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
xf86Msg(X_WARNING,
"xf86ReadBIOS: %s mmap[s=%x,a=%x,o=%x] failed (%s)\n",
DEV_MEM, Len, Base, Offset, strerror(errno));
- return(-1);
+ return -1;
}
#ifdef DEBUG
ErrorF("xf86ReadBIOS: BIOS at 0x%08x has signature 0x%04x\n",
@@ -270,7 +270,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
"-> %02x %02x %02x %02x...\n",
Base, Offset, Len, Buf[0], Buf[1], Buf[2], Buf[3]);
#endif
- return(Len);
+ return Len;
}
@@ -430,7 +430,7 @@ armMapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
}
base = xf86MapInfoMap(memInfoP, Base, Size);
- return (base);
+ return base;
}
return mapVidMem(ScreenNum, Base, Size, flags);
}
diff --git a/hw/xfree86/os-support/bsd/bsd_VTsw.c b/hw/xfree86/os-support/bsd/bsd_VTsw.c
index 4842be5..57d832a 100644
--- a/hw/xfree86/os-support/bsd/bsd_VTsw.c
+++ b/hw/xfree86/os-support/bsd/bsd_VTsw.c
@@ -57,7 +57,7 @@ xf86VTSwitchPending()
{
#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) {
- return(xf86Info.vtRequestsPending ? TRUE : FALSE);
+ return xf86Info.vtRequestsPending ? TRUE : FALSE;
}
#endif
return FALSE;
@@ -70,9 +70,9 @@ xf86VTSwitchAway()
if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) {
xf86Info.vtRequestsPending = FALSE;
if (ioctl(xf86Info.consoleFd, VT_RELDISP, 1) < 0)
- return(FALSE);
+ return FALSE;
else
- return(TRUE);
+ return TRUE;
}
#endif
return FALSE;
@@ -85,19 +85,19 @@ xf86VTSwitchTo()
if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) {
xf86Info.vtRequestsPending = FALSE;
if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ) < 0)
- return(FALSE);
+ return FALSE;
else
- return(TRUE);
+ return TRUE;
}
#endif
- return(TRUE);
+ return TRUE;
}
Bool
xf86VTActivate(int vtno)
{
if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vtno) < 0) {
- return(FALSE);
+ return FALSE;
}
- return(TRUE);
+ return TRUE;
}
diff --git a/hw/xfree86/os-support/bsd/bsd_init.c b/hw/xfree86/os-support/bsd/bsd_init.c
index 7698084..13c6ec3 100644
--- a/hw/xfree86/os-support/bsd/bsd_init.c
+++ b/hw/xfree86/os-support/bsd/bsd_init.c
@@ -724,13 +724,13 @@ xf86ProcessArgument(int argc, char *argv[], int i)
if (!strcmp(argv[i], "-keeptty"))
{
KeepTty = TRUE;
- return(1);
+ return 1;
}
#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
if (!strcmp(argv[i], "-sharevts"))
{
ShareVTs = TRUE;
- return(1);
+ return 1;
}
if ((argv[i][0] == 'v') && (argv[i][1] == 't'))
{
@@ -739,12 +739,12 @@ xf86ProcessArgument(int argc, char *argv[], int i)
{
UseMsg();
VTnum = -1;
- return(0);
+ return 0;
}
- return(1);
+ return 1;
}
#endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */
- return(0);
+ return 0;
}
void
diff --git a/hw/xfree86/os-support/bsd/i386_video.c b/hw/xfree86/os-support/bsd/i386_video.c
index 44abb9d..7aef079 100644
--- a/hw/xfree86/os-support/bsd/i386_video.c
+++ b/hw/xfree86/os-support/bsd/i386_video.c
@@ -246,7 +246,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
"xf86MapVidMem", DEV_MEM, Size, Base,
strerror(errno));
}
- return(base);
+ return base;
}
/* else, mmap /dev/vga */
@@ -266,7 +266,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
FatalError("xf86MapVidMem: Could not mmap /dev/vga (%s)",
strerror(errno));
}
- return(base);
+ return base;
}
static void
@@ -289,7 +289,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
checkDevMem(TRUE);
if (devMemFd == -1) {
- return(-1);
+ return -1;
}
psize = getpagesize();
@@ -308,7 +308,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
xf86Msg(X_WARNING, SYSCTL_MSG2);
}
#endif
- return(-1);
+ return -1;
}
#ifdef DEBUG
ErrorF("xf86ReadBIOS: BIOS at 0x%08x has signature 0x%04x\n",
@@ -321,7 +321,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
"-> %02x %02x %02x %02x...\n",
Base, Offset, Len, Buf[0], Buf[1], Buf[2], Buf[3]);
#endif
- return(Len);
+ return Len;
}
#ifdef USE_I386_IOPL
diff --git a/hw/xfree86/os-support/bsd/sparc64_video.c b/hw/xfree86/os-support/bsd/sparc64_video.c
index ea520c4..c838792 100644
--- a/hw/xfree86/os-support/bsd/sparc64_video.c
+++ b/hw/xfree86/os-support/bsd/sparc64_video.c
@@ -87,5 +87,5 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
int Len)
{
- return (0);
+ return 0;
}
diff --git a/hw/xfree86/os-support/linux/lnx_agp.c b/hw/xfree86/os-support/linux/lnx_agp.c
index 44db866..c65f1e3 100644
--- a/hw/xfree86/os-support/linux/lnx_agp.c
+++ b/hw/xfree86/os-support/linux/lnx_agp.c
@@ -64,7 +64,7 @@ GARTInit(int screenNum)
struct _agp_info agpinf;
if (initDone)
- return (gartFd != -1);
+ return gartFd != -1;
initDone = TRUE;
diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
index 297e7a6..c8cec2e 100644
--- a/hw/xfree86/os-support/linux/lnx_init.c
+++ b/hw/xfree86/os-support/linux/lnx_init.c
@@ -365,17 +365,17 @@ xf86ProcessArgument(int argc, char *argv[], int i)
if (!strcmp(argv[i], "-keeptty"))
{
KeepTty = TRUE;
- return(1);
+ return 1;
}
if (!strcmp(argv[i], "-novtswitch"))
{
VTSwitch = FALSE;
- return(1);
+ return 1;
}
if (!strcmp(argv[i], "-sharevts"))
{
ShareVTs = TRUE;
- return(1);
+ return 1;
}
if ((argv[i][0] == 'v') && (argv[i][1] == 't'))
{
@@ -383,11 +383,11 @@ xf86ProcessArgument(int argc, char *argv[], int i)
{
UseMsg();
VTnum = -1;
- return(0);
+ return 0;
}
- return(1);
+ return 1;
}
- return(0);
+ return 0;
}
void
diff --git a/hw/xfree86/os-support/sco/VTsw_sco.c b/hw/xfree86/os-support/sco/VTsw_sco.c
index 0a59fb9..c9194ec 100644
--- a/hw/xfree86/os-support/sco/VTsw_sco.c
+++ b/hw/xfree86/os-support/sco/VTsw_sco.c
@@ -58,7 +58,7 @@ xf86VTRequest(int sig)
Bool
xf86VTSwitchPending(void)
{
- return(xf86Info.vtRequestsPending ? TRUE : FALSE);
+ return xf86Info.vtRequestsPending ? TRUE : FALSE;
}
/*
@@ -79,9 +79,9 @@ xf86VTSwitchAway(void)
xf86Info.vtRequestsPending = FALSE;
if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_TRUE) < 0) {
- return(FALSE);
+ return FALSE;
} else {
- return(TRUE);
+ return TRUE;
}
}
@@ -97,7 +97,7 @@ xf86VTSwitchTo(void)
xf86Info.vtRequestsPending = FALSE;
if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ) < 0) {
- return(FALSE);
+ return FALSE;
} else {
if (sco_ledstatus >= 0) {
ioctl (xf86Info.consoleFd, KDSETLED, sco_ledstate);
@@ -120,8 +120,8 @@ Bool
xf86VTActivate(int vtno)
{
if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vtno - 1) < 0) {
- return(FALSE);
+ return FALSE;
}
- return(TRUE);
+ return TRUE;
}
diff --git a/hw/xfree86/os-support/sco/sco_init.c b/hw/xfree86/os-support/sco/sco_init.c
index 5f7db34..3322ed5 100644
--- a/hw/xfree86/os-support/sco/sco_init.c
+++ b/hw/xfree86/os-support/sco/sco_init.c
@@ -233,7 +233,7 @@ xf86ProcessArgument(int argc, char *argv[], int i)
*/
if (!strcmp(argv[i], "-keeptty")) {
KeepTty = TRUE;
- return(1);
+ return 1;
}
/*
@@ -246,7 +246,7 @@ xf86ProcessArgument(int argc, char *argv[], int i)
*/
if (!strcmp(argv[i], "-nompxlock")) {
mpxLock = FALSE;
- return (1);
+ return 1;
}
/*
@@ -256,14 +256,14 @@ xf86ProcessArgument(int argc, char *argv[], int i)
if (sscanf(argv[i], "vt%2d", &VTnum) == 0) {
UseMsg();
VTnum = -1;
- return(0);
+ return 0;
}
if (VTnum <= 0) {
UseMsg();
VTnum = -1;
- return(0);
+ return 0;
}
- return(1);
+ return 1;
}
/*
@@ -273,14 +273,14 @@ xf86ProcessArgument(int argc, char *argv[], int i)
if (++i > argc) {
UseMsg();
VTnum = -1;
- return(0);
+ return 0;
} else {
VTnum = -2;
strlcpy (vtdevice, argv[i], sizeof(vtdevice));
- return(2);
+ return 2;
}
}
- return(0);
+ return 0;
}
void
diff --git a/hw/xfree86/os-support/shared/VTsw_noop.c b/hw/xfree86/os-support/shared/VTsw_noop.c
index 3425840..98b3a8d 100644
--- a/hw/xfree86/os-support/shared/VTsw_noop.c
+++ b/hw/xfree86/os-support/shared/VTsw_noop.c
@@ -38,23 +38,23 @@
Bool
xf86VTSwitchPending(void)
{
- return(FALSE);
+ return FALSE;
}
Bool
xf86VTSwitchAway(void)
{
- return(FALSE);
+ return FALSE;
}
Bool
xf86VTSwitchTo(void)
{
- return(TRUE);
+ return TRUE;
}
Bool
xf86VTActivate(int vtno)
{
- return(TRUE);
+ return TRUE;
}
diff --git a/hw/xfree86/os-support/shared/VTsw_usl.c b/hw/xfree86/os-support/shared/VTsw_usl.c
index 393f1c0..d4ef0f7 100644
--- a/hw/xfree86/os-support/shared/VTsw_usl.c
+++ b/hw/xfree86/os-support/shared/VTsw_usl.c
@@ -55,7 +55,7 @@ xf86VTRequest(int sig)
Bool
xf86VTSwitchPending(void)
{
- return(xf86Info.vtRequestsPending ? TRUE : FALSE);
+ return xf86Info.vtRequestsPending ? TRUE : FALSE;
}
Bool
@@ -64,14 +64,14 @@ xf86VTSwitchAway(void)
xf86Info.vtRequestsPending = FALSE;
if (ioctl(xf86Info.consoleFd, VT_RELDISP, 1) < 0)
{
- return(FALSE);
+ return FALSE;
}
else
{
#ifdef OSSWITCHAWAY
OSSWITCHAWAY;
#endif
- return(TRUE);
+ return TRUE;
}
}
@@ -81,11 +81,11 @@ xf86VTSwitchTo(void)
xf86Info.vtRequestsPending = FALSE;
if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ) < 0)
{
- return(FALSE);
+ return FALSE;
}
else
{
- return(TRUE);
+ return TRUE;
}
}
@@ -94,8 +94,8 @@ xf86VTActivate(int vtno)
{
#ifdef VT_ACTIVATE
if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vtno) < 0) {
- return(FALSE);
+ return FALSE;
}
#endif
- return(TRUE);
+ return TRUE;
}
diff --git a/hw/xfree86/os-support/shared/bios_devmem.c b/hw/xfree86/os-support/shared/bios_devmem.c
index 67a14f5..b9dfb7d 100644
--- a/hw/xfree86/os-support/shared/bios_devmem.c
+++ b/hw/xfree86/os-support/shared/bios_devmem.c
@@ -53,7 +53,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
{
xf86Msg(X_WARNING, "xf86ReadBIOS: Failed to open %s (%s)\n",
DEV_MEM, strerror(errno));
- return(-1);
+ return -1;
}
if (lseek(fd, (Base+Offset), SEEK_SET) < 0)
@@ -61,15 +61,15 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
xf86Msg(X_WARNING, "xf86ReadBIOS: %s seek failed (%s)\n",
DEV_MEM, strerror(errno));
close(fd);
- return(-1);
+ return -1;
}
if (read(fd, Buf, Len) != Len)
{
xf86Msg(X_WARNING, "xf86ReadBIOS: %s read failed (%s)\n",
DEV_MEM, strerror(errno));
close(fd);
- return(-1);
+ return -1;
}
close(fd);
- return(Len);
+ return Len;
}
diff --git a/hw/xfree86/os-support/shared/bios_mmap.c b/hw/xfree86/os-support/shared/bios_mmap.c
index 40afd5b..33a8df0 100644
--- a/hw/xfree86/os-support/shared/bios_mmap.c
+++ b/hw/xfree86/os-support/shared/bios_mmap.c
@@ -53,7 +53,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
{
xf86Msg(X_WARNING, "xf86ReadBIOS: Failed to open %s (%s)\n",
DEV_MEM, strerror(errno));
- return(-1);
+ return -1;
}
psize = getpagesize();
Offset += Base & (psize - 1);
@@ -66,14 +66,14 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
xf86Msg(X_WARNING, "xf86ReadBIOS: %s mmap failed (%s)\n",
DEV_MEM, strerror(errno));
close(fd);
- return(-1);
+ return -1;
}
DebugF("xf86ReadBIOS: BIOS at 0x%08x has signature 0x%04x\n",
Base, ptr[0] | (ptr[1] << 8));
(void)memcpy(Buf, (void *)(ptr + Offset), Len);
(void)munmap((caddr_t)ptr, mlen);
(void)close(fd);
- return(Len);
+ return Len;
}
#else /* __alpha__ */
@@ -114,7 +114,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
{
xf86Msg(X_WARNING, "xf86ReadBIOS: Failed to open %s (%s)\n",
DEV_MEM, strerror(errno));
- return(-1);
+ return -1;
}
psize = getpagesize();
@@ -128,14 +128,14 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
{
xf86Msg(X_WARNING, "xf86ReadBIOS: Failed to mmap %s (%s)\n",
DEV_MEM, strerror(errno));
- return(-1);
+ return -1;
}
xf86SlowBCopyFromBus((unsigned char *)(base+Offset), Buf, Len);
munmap((caddr_t)base, mlen);
close(fd);
- return(Len);
+ return Len;
}
#endif /* __alpha__ */
diff --git a/hw/xfree86/os-support/shared/posix_tty.c b/hw/xfree86/os-support/shared/posix_tty.c
index 2e22bc3..1a33070 100644
--- a/hw/xfree86/os-support/shared/posix_tty.c
+++ b/hw/xfree86/os-support/shared/posix_tty.c
@@ -108,7 +108,7 @@ GetBaud (int baudrate)
if (baudrate == 460800)
return B460800;
#endif
- return (0);
+ return 0;
}
int
@@ -122,7 +122,7 @@ xf86OpenSerial (pointer options)
if (!dev)
{
xf86Msg (X_ERROR, "xf86OpenSerial: No Device specified.\n");
- return (-1);
+ return -1;
}
SYSCALL (fd = open (dev, O_RDWR | O_NONBLOCK));
@@ -132,14 +132,14 @@ xf86OpenSerial (pointer options)
"xf86OpenSerial: Cannot open device %s\n\t%s.\n",
dev, strerror (errno));
free(dev);
- return (-1);
+ return -1;
}
if (!isatty (fd))
{
/* Allow non-tty devices to be opened. */
free(dev);
- return (fd);
+ return fd;
}
/* set up default port parameters */
@@ -162,7 +162,7 @@ xf86OpenSerial (pointer options)
{
SYSCALL (close (fd));
free(dev);
- return (-1);
+ return -1;
}
SYSCALL (i = fcntl (fd, F_GETFL, 0));
@@ -170,7 +170,7 @@ xf86OpenSerial (pointer options)
{
SYSCALL (close (fd));
free(dev);
- return (-1);
+ return -1;
}
i &= ~O_NONBLOCK;
SYSCALL (i = fcntl (fd, F_SETFL, i));
@@ -178,10 +178,10 @@ xf86OpenSerial (pointer options)
{
SYSCALL (close (fd));
free(dev);
- return (-1);
+ return -1;
}
free(dev);
- return (fd);
+ return fd;
}
int
@@ -212,7 +212,7 @@ xf86SetSerial (int fd, pointer options)
{
xf86Msg (X_ERROR,
"Invalid Option BaudRate value: %d\n", val);
- return (-1);
+ return -1;
}
}
@@ -229,7 +229,7 @@ xf86SetSerial (int fd, pointer options)
default:
xf86Msg (X_ERROR,
"Invalid Option StopBits value: %d\n", val);
- return (-1);
+ return -1;
break;
}
}
@@ -257,7 +257,7 @@ xf86SetSerial (int fd, pointer options)
default:
xf86Msg (X_ERROR,
"Invalid Option DataBits value: %d\n", val);
- return (-1);
+ return -1;
break;
}
}
@@ -281,7 +281,7 @@ xf86SetSerial (int fd, pointer options)
{
xf86Msg (X_ERROR, "Invalid Option Parity value: %s\n",
s);
- return (-1);
+ return -1;
}
}
@@ -317,7 +317,7 @@ xf86SetSerial (int fd, pointer options)
{
xf86Msg (X_ERROR,
"Invalid Option FlowControl value: %s\n", s);
- return (-1);
+ return -1;
}
}
@@ -333,7 +333,7 @@ xf86SetSerial (int fd, pointer options)
#else
xf86Msg (X_WARNING,
"Option ClearDTR not supported on this OS\n");
- return (-1);
+ return -1;
#endif
xf86MarkOptionUsedByName (options, "ClearDTR");
}
@@ -342,12 +342,12 @@ xf86SetSerial (int fd, pointer options)
{
xf86Msg (X_WARNING,
"Option ClearRTS not supported on this OS\n");
- return (-1);
+ return -1;
xf86MarkOptionUsedByName (options, "ClearRTS");
}
SYSCALL (r = tcsetattr (fd, TCSANOW, &t));
- return (r);
+ return r;
}
int
@@ -374,11 +374,11 @@ xf86SetSerialSpeed (int fd, int speed)
{
xf86Msg (X_ERROR,
"Invalid Option BaudRate value: %d\n", speed);
- return (-1);
+ return -1;
}
SYSCALL (r = tcsetattr (fd, TCSANOW, &t));
- return (r);
+ return r;
}
int
@@ -393,7 +393,7 @@ xf86ReadSerial (int fd, void *buf, int count)
for (i = 1; i < r; i++)
DebugF(", 0x%x",(unsigned char)*(((unsigned char *)buf) + i));
DebugF("\n");
- return (r);
+ return r;
}
int
@@ -407,7 +407,7 @@ xf86WriteSerial (int fd, const void *buf, int count)
ErrorF(", 0x%x",(unsigned char)*(((unsigned char *)buf) + i));
DebugF("\n");
SYSCALL (r = write (fd, buf, count));
- return (r);
+ return r;
}
int
@@ -416,7 +416,7 @@ xf86CloseSerial (int fd)
int r;
SYSCALL (r = close (fd));
- return (r);
+ return r;
}
int
@@ -442,7 +442,7 @@ xf86WaitForInput (int fd, int timeout)
SYSCALL (r = select (FD_SETSIZE, NULL, NULL, NULL, &to));
}
xf86ErrorFVerb (9,"select returned %d\n", r);
- return (r);
+ return r;
}
int
@@ -451,7 +451,7 @@ xf86SerialSendBreak (int fd, int duration)
int r;
SYSCALL (r = tcsendbreak (fd, duration));
- return (r);
+ return r;
}
diff --git a/hw/xfree86/os-support/solaris/sun_VTsw.c b/hw/xfree86/os-support/solaris/sun_VTsw.c
index 1e2774b..cff279e 100644
--- a/hw/xfree86/os-support/solaris/sun_VTsw.c
+++ b/hw/xfree86/os-support/solaris/sun_VTsw.c
@@ -66,7 +66,7 @@ xf86VTAcquire(int sig)
Bool
xf86VTSwitchPending(void)
{
- return(xf86Info.vtRequestsPending ? TRUE : FALSE);
+ return xf86Info.vtRequestsPending ? TRUE : FALSE;
}
Bool
@@ -81,7 +81,7 @@ xf86VTSwitchAway(void)
if (xf86VTPruneDoor) {
xf86VTPruneDoor = 0;
ioctl(xf86Info.consoleFd, VT_RELDISP, 1);
- return (TRUE);
+ return TRUE;
}
vt_door_arg.vt_ev = VT_EV_HOTKEYS;
@@ -94,15 +94,15 @@ xf86VTSwitchAway(void)
door_arg.desc_num = 0;
if ((door_fd = open(VT_DAEMON_DOOR_FILE, O_RDONLY)) < 0)
- return (FALSE);
+ return FALSE;
if (door_call(door_fd, &door_arg) != 0) {
close(door_fd);
- return (FALSE);
+ return FALSE;
}
close(door_fd);
- return (TRUE);
+ return TRUE;
}
Bool
@@ -111,11 +111,11 @@ xf86VTSwitchTo(void)
xf86Info.vtRequestsPending = FALSE;
if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ) < 0)
{
- return(FALSE);
+ return FALSE;
}
else
{
- return(TRUE);
+ return TRUE;
}
}
@@ -125,13 +125,13 @@ xf86VTActivate(int vtno)
struct vt_stat state;
if (ioctl(xf86Info.consoleFd, VT_GETSTATE, &state) < 0)
- return(FALSE);
+ return FALSE;
if ((state.v_state & (1 << vtno)) == 0)
- return(FALSE);
+ return FALSE;
xf86Info.vtRequestsPending = TRUE;
xf86Info.vtPendingNum = vtno;
- return(TRUE);
+ return TRUE;
}
diff --git a/hw/xfree86/os-support/solaris/sun_agp.c b/hw/xfree86/os-support/solaris/sun_agp.c
index ccecd11..734a6e1 100644
--- a/hw/xfree86/os-support/solaris/sun_agp.c
+++ b/hw/xfree86/os-support/solaris/sun_agp.c
@@ -78,7 +78,7 @@ static Bool
GARTInit(int screenNum)
{
if (initDone)
- return (gartFd != -1);
+ return gartFd != -1;
if (gartFd == -1)
gartFd = open(AGP_DEVICE, O_RDWR);
diff --git a/hw/xfree86/os-support/sysv/sysv_init.c b/hw/xfree86/os-support/sysv/sysv_init.c
index 170bb89..9a423ff 100644
--- a/hw/xfree86/os-support/sysv/sysv_init.c
+++ b/hw/xfree86/os-support/sysv/sysv_init.c
@@ -215,7 +215,7 @@ xf86ProcessArgument(int argc, char *argv[], int i)
if (!strcmp(argv[i], "-keeptty"))
{
KeepTty = TRUE;
- return(1);
+ return 1;
}
#ifdef SVR4
/*
@@ -226,7 +226,7 @@ xf86ProcessArgument(int argc, char *argv[], int i)
if (!strcmp(argv[i], "-protect0"))
{
Protect0 = TRUE;
- return(1);
+ return 1;
}
#endif
if ((argv[i][0] == 'v') && (argv[i][1] == 't'))
@@ -235,11 +235,11 @@ xf86ProcessArgument(int argc, char *argv[], int i)
{
UseMsg();
VTnum = -1;
- return(0);
+ return 0;
}
- return(1);
+ return 1;
}
- return(0);
+ return 0;
}
void
diff --git a/hw/xfree86/os-support/sysv/sysv_video.c b/hw/xfree86/os-support/sysv/sysv_video.c
index 43c3062..480abe5 100644
--- a/hw/xfree86/os-support/sysv/sysv_video.c
+++ b/hw/xfree86/os-support/sysv/sysv_video.c
@@ -106,7 +106,7 @@ mmapStat(pointer Base, unsigned long Size) {
}
}
if (region == -1 && nmmreg > 0) region=region * i;
- return(region);
+ return region;
}
#endif
@@ -211,7 +211,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
"xf86MapVidMem: SUCCEED Mapping FrameBuffer \n");
#endif /* HAS_SVR3_MMAPDRV */
#endif /* SVR4 */
- return(base);
+ return base;
}
/* ARGSUSED */
diff --git a/hw/xfree86/parser/Configint.h b/hw/xfree86/parser/Configint.h
index 03509b3..dda020e 100644
--- a/hw/xfree86/parser/Configint.h
+++ b/hw/xfree86/parser/Configint.h
@@ -105,7 +105,7 @@ if( (ptr=calloc(1,sizeof(typerec))) == NULL ) { return; }
if ((ptr->f=func) == NULL)\
{\
CLEANUP (ptr);\
- return (NULL);\
+ return NULL;\
}
#define HANDLE_LIST(field,func,type)\
@@ -114,7 +114,7 @@ type p = func ();\
if (p == NULL)\
{\
CLEANUP (ptr);\
- return (NULL);\
+ return NULL;\
}\
else\
{\
diff --git a/hw/xfree86/parser/Device.c b/hw/xfree86/parser/Device.c
index 47ece07..d71abc6 100644
--- a/hw/xfree86/parser/Device.c
+++ b/hw/xfree86/parser/Device.c
@@ -363,9 +363,9 @@ xf86findDevice (const char *ident, XF86ConfDevicePtr p)
while (p)
{
if (xf86nameCompare (ident, p->dev_identifier) == 0)
- return (p);
+ return p;
p = p->list.next;
}
- return (NULL);
+ return NULL;
}
diff --git a/hw/xfree86/parser/Flags.c b/hw/xfree86/parser/Flags.c
index f4fea28..699dc6b 100644
--- a/hw/xfree86/parser/Flags.c
+++ b/hw/xfree86/parser/Flags.c
@@ -318,10 +318,10 @@ xf86findOption (XF86OptionPtr list, const char *name)
while (list)
{
if (xf86nameCompare (list->opt_name, name) == 0)
- return (list);
+ return list;
list = list->list.next;
}
- return (NULL);
+ return NULL;
}
/*
@@ -339,11 +339,11 @@ xf86findOptionValue (XF86OptionPtr list, const char *name)
if (p)
{
if (p->opt_val)
- return (p->opt_val);
+ return p->opt_val;
else
return "";
}
- return (NULL);
+ return NULL;
}
XF86OptionPtr
@@ -361,7 +361,7 @@ xf86optionListCreate( const char **options, int count, int used )
if( (count % 2) != 0 )
{
fprintf( stderr, "xf86optionListCreate: count must be an even number.\n" );
- return (NULL);
+ return NULL;
}
for (i = 0; i < count; i += 2)
{
@@ -375,7 +375,7 @@ xf86optionListCreate( const char **options, int count, int used )
p = addNewOption2 (p, t1, t2, used);
}
- return (p);
+ return p;
}
/* the 2 given lists are merged. If an option with the same name is present in
@@ -425,7 +425,7 @@ xf86optionListMerge (XF86OptionPtr head, XF86OptionPtr tail)
} else
head = tail;
- return (head);
+ return head;
}
char *
@@ -452,7 +452,7 @@ xf86parseOption(XF86OptionPtr head)
if ((token = xf86getSubToken(&comment)) != STRING) {
xf86parseError(BAD_OPTION_MSG, NULL);
free(comment);
- return (head);
+ return head;
}
name = val.str;
@@ -489,7 +489,7 @@ xf86parseOption(XF86OptionPtr head)
if (old == NULL)
return ((XF86OptionPtr)xf86addListItem((glp)head, (glp)cnew));
- return (head);
+ return head;
}
void
diff --git a/hw/xfree86/parser/Input.c b/hw/xfree86/parser/Input.c
index 8c8e46f..50869d4 100644
--- a/hw/xfree86/parser/Input.c
+++ b/hw/xfree86/parser/Input.c
@@ -175,11 +175,11 @@ xf86validateInput (XF86ConfigPtr p)
while (input) {
if (!input->inp_driver) {
xf86validationError (UNDEFINED_INPUTDRIVER_MSG, input->inp_identifier);
- return (FALSE);
+ return FALSE;
}
input = input->list.next;
}
- return (TRUE);
+ return TRUE;
}
XF86ConfInputPtr
@@ -188,11 +188,11 @@ xf86findInput (const char *ident, XF86ConfInputPtr p)
while (p)
{
if (xf86nameCompare (ident, p->inp_identifier) == 0)
- return (p);
+ return p;
p = p->list.next;
}
- return (NULL);
+ return NULL;
}
XF86ConfInputPtr
@@ -201,10 +201,10 @@ xf86findInputByDriver (const char *driver, XF86ConfInputPtr p)
while (p)
{
if (xf86nameCompare (driver, p->inp_driver) == 0)
- return (p);
+ return p;
p = p->list.next;
}
- return (NULL);
+ return NULL;
}
diff --git a/hw/xfree86/parser/Layout.c b/hw/xfree86/parser/Layout.c
index 00c1e7d..e1f770b 100644
--- a/hw/xfree86/parser/Layout.c
+++ b/hw/xfree86/parser/Layout.c
@@ -513,7 +513,7 @@ xf86validateLayout (XF86ConfigPtr p)
{
xf86validationError (UNDEFINED_SCREEN_MSG,
adj->adj_screen_str, layout->lay_identifier);
- return (FALSE);
+ return FALSE;
}
else
adj->adj_screen = screen;
@@ -529,7 +529,7 @@ xf86validateLayout (XF86ConfigPtr p)
{
xf86validationError (UNDEFINED_DEVICE_LAY_MSG,
iptr->inactive_device_str, layout->lay_identifier);
- return (FALSE);
+ return FALSE;
}
else
iptr->inactive_device = device;
@@ -541,7 +541,7 @@ xf86validateLayout (XF86ConfigPtr p)
layout = layout->list.next;
}
- return (TRUE);
+ return TRUE;
}
XF86ConfLayoutPtr
@@ -550,9 +550,9 @@ xf86findLayout (const char *name, XF86ConfLayoutPtr list)
while (list)
{
if (xf86nameCompare (list->lay_identifier, name) == 0)
- return (list);
+ return list;
list = list->list.next;
}
- return (NULL);
+ return NULL;
}
diff --git a/hw/xfree86/parser/Monitor.c b/hw/xfree86/parser/Monitor.c
index 50de091..76c35ae 100644
--- a/hw/xfree86/parser/Monitor.c
+++ b/hw/xfree86/parser/Monitor.c
@@ -264,7 +264,7 @@ xf86parseModeLine (void)
#ifdef DEBUG
printf ("ModeLine parsed\n");
#endif
- return (ptr);
+ return ptr;
}
static XF86ConfModeLinePtr
@@ -413,7 +413,7 @@ xf86parseVerboseMode (void)
#ifdef DEBUG
printf ("Verbose Mode parsed\n");
#endif
- return (ptr);
+ return ptr;
}
#undef CLEANUP
@@ -848,11 +848,11 @@ xf86findMonitor (const char *ident, XF86ConfMonitorPtr p)
while (p)
{
if (xf86nameCompare (ident, p->mon_identifier) == 0)
- return (p);
+ return p;
p = p->list.next;
}
- return (NULL);
+ return NULL;
}
XF86ConfModesPtr
@@ -861,11 +861,11 @@ xf86findModes (const char *ident, XF86ConfModesPtr p)
while (p)
{
if (xf86nameCompare (ident, p->modes_identifier) == 0)
- return (p);
+ return p;
p = p->list.next;
}
- return (NULL);
+ return NULL;
}
XF86ConfModeLinePtr
@@ -874,11 +874,11 @@ xf86findModeLine (const char *ident, XF86ConfModeLinePtr p)
while (p)
{
if (xf86nameCompare (ident, p->ml_identifier) == 0)
- return (p);
+ return p;
p = p->list.next;
}
- return (NULL);
+ return NULL;
}
int
@@ -895,10 +895,10 @@ xf86validateMonitor (XF86ConfigPtr p, XF86ConfScreenPtr screen)
xf86validationError (UNDEFINED_MODES_MSG,
modeslnk->ml_modes_str,
screen->scrn_identifier);
- return (FALSE);
+ return FALSE;
}
modeslnk->ml_modes = modes;
modeslnk = modeslnk->list.next;
}
- return (TRUE);
+ return TRUE;
}
diff --git a/hw/xfree86/parser/Screen.c b/hw/xfree86/parser/Screen.c
index b3b004d..dd2319d 100644
--- a/hw/xfree86/parser/Screen.c
+++ b/hw/xfree86/parser/Screen.c
@@ -522,7 +522,7 @@ xf86validateScreen (XF86ConfigPtr p)
{
screen->scrn_monitor = monitor;
if (!xf86validateMonitor(p, screen))
- return (FALSE);
+ return FALSE;
}
}
@@ -535,13 +535,13 @@ xf86validateScreen (XF86ConfigPtr p)
if (!adaptor->al_adaptor)
{
xf86validationError (UNDEFINED_ADAPTOR_MSG, adaptor->al_adaptor_str, screen->scrn_identifier);
- return (FALSE);
+ return FALSE;
}
else if (adaptor->al_adaptor->va_fwdref)
{
xf86validationError (ADAPTOR_REF_TWICE_MSG, adaptor->al_adaptor_str,
adaptor->al_adaptor->va_fwdref);
- return (FALSE);
+ return FALSE;
}
adaptor->al_adaptor->va_fwdref = strdup(screen->scrn_identifier);
@@ -551,7 +551,7 @@ xf86validateScreen (XF86ConfigPtr p)
screen = screen->list.next;
}
- return (TRUE);
+ return TRUE;
}
XF86ConfScreenPtr
@@ -560,10 +560,10 @@ xf86findScreen (const char *ident, XF86ConfScreenPtr p)
while (p)
{
if (xf86nameCompare (ident, p->scrn_identifier) == 0)
- return (p);
+ return p;
p = p->list.next;
}
- return (NULL);
+ return NULL;
}
diff --git a/hw/xfree86/parser/Video.c b/hw/xfree86/parser/Video.c
index beeb43e..3774387 100644
--- a/hw/xfree86/parser/Video.c
+++ b/hw/xfree86/parser/Video.c
@@ -288,9 +288,9 @@ xf86findVideoAdaptor (const char *ident, XF86ConfVideoAdaptorPtr p)
while (p)
{
if (xf86nameCompare (ident, p->va_identifier) == 0)
- return (p);
+ return p;
p = p->list.next;
}
- return (NULL);
+ return NULL;
}
diff --git a/hw/xfree86/parser/read.c b/hw/xfree86/parser/read.c
index 4e42b24..d4d5252 100644
--- a/hw/xfree86/parser/read.c
+++ b/hw/xfree86/parser/read.c
@@ -87,7 +87,7 @@ xf86validateConfig (XF86ConfigPtr p)
if (!xf86validateLayout (p))
return FALSE;
- return (TRUE);
+ return TRUE;
}
XF86ConfigPtr
@@ -113,7 +113,7 @@ xf86readConfigFile (void)
{
xf86parseError (QUOTE_MSG, "Section");
CLEANUP (ptr);
- return (NULL);
+ return NULL;
}
xf86setSection (val.str);
if (xf86nameCompare (val.str, "files") == 0)
@@ -232,11 +232,11 @@ xf86readConfigFile (void)
}
if (xf86validateConfig (ptr))
- return (ptr);
+ return ptr;
else
{
CLEANUP (ptr);
- return (NULL);
+ return NULL;
}
}
@@ -263,10 +263,10 @@ xf86addListItem (GenericListPtr head, GenericListPtr new)
if (last)
{
last->next = new;
- return (head);
+ return head;
}
else
- return (new);
+ return new;
}
/*
diff --git a/hw/xfree86/parser/scan.c b/hw/xfree86/parser/scan.c
index 05fbc89..5312143 100644
--- a/hw/xfree86/parser/scan.c
+++ b/hw/xfree86/parser/scan.c
@@ -155,11 +155,11 @@ xf86strToUL (char *str)
}
else
{
- return (tot);
+ return tot;
}
p++;
}
- return (tot);
+ return tot;
}
/*
@@ -289,7 +289,7 @@ xf86getNextLine(void)
} while (!eolFound);
- return (ret);
+ return ret;
}
/*
@@ -308,7 +308,7 @@ xf86getToken (xf86ConfigSymTabRec * tab)
* oth * case the next token must be read from the input.
*/
if (pushToken == EOF_TOKEN)
- return (EOF_TOKEN);
+ return EOF_TOKEN;
else if (pushToken == LOCK_TOKEN)
{
/*
@@ -350,7 +350,7 @@ again:
goto again;
}
else
- return (pushToken = EOF_TOKEN);
+ return pushToken = EOF_TOKEN;
}
configLineNo++;
configPos = 0;
@@ -387,7 +387,7 @@ again:
* Use xf86addComment when setting a comment.
*/
val.str = configRBuf;
- return (COMMENT);
+ return COMMENT;
}
/* GJA -- handle '-' and ',' * Be careful: "-hsync" is a keyword. */
@@ -436,7 +436,7 @@ again:
configRBuf[i] = '\0';
val.num = xf86strToUL (configRBuf);
val.realnum = atof (configRBuf);
- return (NUMBER);
+ return NUMBER;
}
/*
@@ -453,7 +453,7 @@ again:
configRBuf[i] = '\0';
val.str = malloc (strlen (configRBuf) + 1);
strcpy (val.str, configRBuf); /* private copy ! */
- return (STRING);
+ return STRING;
}
/*
@@ -486,9 +486,9 @@ again:
pushToken = LOCK_TOKEN;
if (temp == COMMA || temp == DASH)
- return (temp);
+ return temp;
if (temp == NUMBER || temp == STRING)
- return (temp);
+ return temp;
}
/*
@@ -499,12 +499,12 @@ again:
i = 0;
while (tab[i].token != -1)
if (xf86nameCompare (configRBuf, tab[i].name) == 0)
- return (tab[i].token);
+ return tab[i].token;
else
i++;
}
- return (ERROR_TOKEN); /* Error catcher */
+ return ERROR_TOKEN; /* Error catcher */
}
int
@@ -519,7 +519,7 @@ xf86getSubToken (char **comment)
*comment = xf86addComment(*comment, val.str);
}
else
- return (token);
+ return token;
}
/*NOTREACHED*/
}
@@ -536,7 +536,7 @@ xf86getSubTokenWithTab (char **comment, xf86ConfigSymTabRec *tab)
*comment = xf86addComment(*comment, val.str);
}
else
- return (token);
+ return token;
}
/*NOTREACHED*/
}
@@ -1112,7 +1112,7 @@ StringToToken (char *str, xf86ConfigSymTabRec * tab)
if (!xf86nameCompare (tab[i].name, str))
return tab[i].token;
}
- return (ERROR_TOKEN);
+ return ERROR_TOKEN;
}
@@ -1127,9 +1127,9 @@ xf86nameCompare (const char *s1, const char *s2)
if (!s1 || *s1 == 0) {
if (!s2 || *s2 == 0)
- return (0);
+ return 0;
else
- return (1);
+ return 1;
}
while (*s1 == '_' || *s1 == ' ' || *s1 == '\t')
@@ -1141,7 +1141,7 @@ xf86nameCompare (const char *s1, const char *s2)
while (c1 == c2)
{
if (c1 == '\0')
- return (0);
+ return 0;
s1++;
s2++;
while (*s1 == '_' || *s1 == ' ' || *s1 == '\t')
@@ -1151,7 +1151,7 @@ xf86nameCompare (const char *s1, const char *s2)
c1 = (isupper (*s1) ? tolower (*s1) : *s1);
c2 = (isupper (*s2) ? tolower (*s2) : *s2);
}
- return (c1 - c2);
+ return c1 - c2;
}
char *
@@ -1161,7 +1161,7 @@ xf86addComment(char *cur, char *add)
int len, curlen, iscomment, hasnewline = 0, endnewline;
if (add == NULL || add[0] == '\0')
- return (cur);
+ return cur;
if (cur) {
curlen = strlen(cur);
@@ -1186,7 +1186,7 @@ xf86addComment(char *cur, char *add)
len += 1 + iscomment + (!hasnewline) + (!endnewline) + eol_seen;
if ((str = realloc(cur, len + curlen)) == NULL)
- return (cur);
+ return cur;
cur = str;
@@ -1198,7 +1198,7 @@ xf86addComment(char *cur, char *add)
if (!endnewline)
strcat(cur, "\n");
- return (cur);
+ return cur;
}
Bool
diff --git a/hw/xfree86/ramdac/IBM.c b/hw/xfree86/ramdac/IBM.c
index 2d9fe4d..89fb25c 100644
--- a/hw/xfree86/ramdac/IBM.c
+++ b/hw/xfree86/ramdac/IBM.c
@@ -96,13 +96,13 @@ IBMramdac640CalculateMNPCForClock(
lowestFreqErr = freqErr;
/* Return if we found an exact match */
if (freqErr == 0)
- return (ActualClock);
+ return ActualClock;
}
}
}
}
- return (ActualClock);
+ return ActualClock;
}
unsigned long
@@ -162,13 +162,13 @@ IBMramdac526CalculateMNPCForClock(
lowestFreqErr = freqErr;
/* Return if we found an exact match */
if (freqErr == 0)
- return (ActualClock);
+ return ActualClock;
}
}
}
}
- return (ActualClock);
+ return ActualClock;
}
void
diff --git a/hw/xfree86/ramdac/TI.c b/hw/xfree86/ramdac/TI.c
index 1c541d7..eee5d45 100644
--- a/hw/xfree86/ramdac/TI.c
+++ b/hw/xfree86/ramdac/TI.c
@@ -118,7 +118,7 @@ TIramdacCalculateMNPForClock(
DebugF( "f_out=%ld f_vco=%.1f n=%d m=%d p=%d\n",
ActualClock, VCO, *rN, *rM, *rP);
- return (ActualClock);
+ return ActualClock;
}
void
diff --git a/hw/xfree86/ramdac/xf86RamDac.c b/hw/xfree86/ramdac/xf86RamDac.c
index f4d1274..24806b6 100644
--- a/hw/xfree86/ramdac/xf86RamDac.c
+++ b/hw/xfree86/ramdac/xf86RamDac.c
@@ -82,7 +82,7 @@ RamDacInit(ScrnInfoPtr pScrn, RamDacRecPtr ramdacPriv)
((RamDacScreenRecPtr) (pScrn)->privates[RamDacGetScreenIndex()].ptr);
ramdacScrPtr->RamDacRec = ramdacPriv;
- return(TRUE);
+ return TRUE;
}
void
diff --git a/hw/xfree86/utils/gtf/gtf.c b/hw/xfree86/utils/gtf/gtf.c
index 8ce9327..bd5de7d 100644
--- a/hw/xfree86/utils/gtf/gtf.c
+++ b/hw/xfree86/utils/gtf/gtf.c
@@ -634,7 +634,7 @@ mode *vert_refresh (int h_pixels, int v_lines, float freq,
m->h_freq = h_freq;
m->v_freq = freq;
- return (m);
+ return m;
}
@@ -686,7 +686,7 @@ options *parse_command_line (int argc, char *argv[])
if (!o->fbmode && !o->xorgmode) o->xorgmode = 1;
- return (o);
+ return o;
bad_option:
@@ -713,7 +713,7 @@ options *parse_command_line (int argc, char *argv[])
fprintf (stderr, "\n");
free (o);
- return (NULL);
+ return NULL;
}
diff --git a/hw/xfree86/vbe/vbe.c b/hw/xfree86/vbe/vbe.c
index 2ace752..0b34648 100644
--- a/hw/xfree86/vbe/vbe.c
+++ b/hw/xfree86/vbe/vbe.c
@@ -370,7 +370,7 @@ VBEGetVBEInfo(vbeInfoPtr pVbe)
xf86ExecX86int10(pVbe->pInt10);
if (R16(pVbe->pInt10->ax) != 0x4f)
- return (NULL);
+ return NULL;
block = calloc(sizeof(VbeInfoBlock), 1);
block->VESASignature[0] = ((char*)pVbe->memory)[0];
@@ -418,7 +418,7 @@ VBEGetVBEInfo(vbeInfoPtr pVbe)
memcpy(&block->OemData, ((char*)pVbe->memory) + 256, 256);
}
- return (block);
+ return block;
}
void
@@ -493,10 +493,10 @@ VBEGetVBEMode(vbeInfoPtr pVbe, int *mode)
if (R16(pVbe->pInt10->ax) == 0x4f) {
*mode = R16(pVbe->pInt10->bx);
- return (TRUE);
+ return TRUE;
}
- return (FALSE);
+ return FALSE;
}
VbeModeInfoBlock *
@@ -525,7 +525,7 @@ VBEGetModeInfo(vbeInfoPtr pVbe, int mode)
pVbe->pInt10->di = SEG_OFF(pVbe->real_mode_base);
xf86ExecX86int10(pVbe->pInt10);
if (R16(pVbe->pInt10->ax) != 0x4f)
- return (NULL);
+ return NULL;
block = calloc(sizeof(VbeModeInfoBlock), 1);
@@ -591,7 +591,7 @@ VBEGetModeInfo(vbeInfoPtr pVbe, int mode)
else
memcpy(&block->PhysBasePtr, ((char*)pVbe->memory) + 40, 216);
- return (block);
+ return block;
}
void
@@ -657,7 +657,7 @@ VBESaveRestore(vbeInfoPtr pVbe, vbeSaveRestoreFunction function,
pVbe->pInt10->cx = 0x000f;
xf86ExecX86int10(pVbe->pInt10);
if (R16(pVbe->pInt10->ax) != 0x4f)
- return (FALSE);
+ return FALSE;
if (function == MODE_SAVE) {
int npages = (R16(pVbe->pInt10->bx) * 64) / 4096 + 1;
@@ -665,7 +665,7 @@ VBESaveRestore(vbeInfoPtr pVbe, vbeSaveRestoreFunction function,
real_mode_pages)) == NULL) {
xf86DrvMsg(screen, X_ERROR,
"Cannot allocate memory to save SVGA state.\n");
- return (FALSE);
+ return FALSE;
}
}
*size = pVbe->pInt10->bx * 64;
@@ -716,9 +716,9 @@ VBEBankSwitch(vbeInfoPtr pVbe, unsigned int iBank, int window)
xf86ExecX86int10(pVbe->pInt10);
if (R16(pVbe->pInt10->ax) != 0x4f)
- return (FALSE);
+ return FALSE;
- return (TRUE);
+ return TRUE;
}
Bool
@@ -726,7 +726,7 @@ VBESetGetLogicalScanlineLength(vbeInfoPtr pVbe, vbeScanwidthCommand command,
int width, int *pixels, int *bytes, int *max)
{
if (command < SCANWID_SET || command > SCANWID_GET_MAX)
- return (FALSE);
+ return FALSE;
/*
Input:
@@ -755,7 +755,7 @@ VBESetGetLogicalScanlineLength(vbeInfoPtr pVbe, vbeScanwidthCommand command,
xf86ExecX86int10(pVbe->pInt10);
if (R16(pVbe->pInt10->ax) != 0x4f)
- return (FALSE);
+ return FALSE;
if (command == SCANWID_GET || command == SCANWID_GET_MAX) {
if (pixels)
@@ -766,7 +766,7 @@ VBESetGetLogicalScanlineLength(vbeInfoPtr pVbe, vbeScanwidthCommand command,
*max = R16(pVbe->pInt10->dx);
}
- return (TRUE);
+ return TRUE;
}
Bool
@@ -780,9 +780,9 @@ VBESetDisplayStart(vbeInfoPtr pVbe, int x, int y, Bool wait_retrace)
xf86ExecX86int10(pVbe->pInt10);
if (R16(pVbe->pInt10->ax) != 0x4f)
- return (FALSE);
+ return FALSE;
- return (TRUE);
+ return TRUE;
}
Bool
@@ -794,12 +794,12 @@ VBEGetDisplayStart(vbeInfoPtr pVbe, int *x, int *y)
xf86ExecX86int10(pVbe->pInt10);
if (R16(pVbe->pInt10->ax) != 0x4f)
- return (FALSE);
+ return FALSE;
*x = pVbe->pInt10->cx;
*y = pVbe->pInt10->dx;
- return (TRUE);
+ return TRUE;
}
int
@@ -827,7 +827,7 @@ VBESetGetDACPaletteFormat(vbeInfoPtr pVbe, int bits)
xf86ExecX86int10(pVbe->pInt10);
if (R16(pVbe->pInt10->ax) != 0x4f)
- return (0);
+ return 0;
return (bits != 0 ? bits : (pVbe->pInt10->bx >> 8) & 0x00ff);
}
@@ -878,15 +878,15 @@ VBESetGetPaletteData(vbeInfoPtr pVbe, Bool set, int first, int num,
xf86ExecX86int10(pVbe->pInt10);
if (R16(pVbe->pInt10->ax) != 0x4f)
- return (NULL);
+ return NULL;
if (set)
- return (data);
+ return data;
data = malloc(num * sizeof(CARD32));
memcpy(data, pVbe->memory, num * sizeof(CARD32));
- return (data);
+ return data;
}
VBEpmi *
@@ -915,14 +915,14 @@ VBEGetVBEpmi(vbeInfoPtr pVbe)
xf86ExecX86int10(pVbe->pInt10);
if (R16(pVbe->pInt10->ax) != 0x4f)
- return (NULL);
+ return NULL;
pmi = malloc(sizeof(VBEpmi));
pmi->seg_tbl = R16(pVbe->pInt10->es);
pmi->tbl_off = R16(pVbe->pInt10->di);
pmi->tbl_len = R16(pVbe->pInt10->cx);
- return (pmi);
+ return pmi;
}
#if 0
@@ -1034,9 +1034,9 @@ VBEGetPixelClock(vbeInfoPtr pVbe, int mode, int clock)
xf86ExecX86int10(pVbe->pInt10);
if (R16(pVbe->pInt10->ax) != 0x4f)
- return (0);
+ return 0;
- return (pVbe->pInt10->cx);
+ return pVbe->pInt10->cx;
}
Bool
diff --git a/hw/xfree86/vgahw/vgaCmap.c b/hw/xfree86/vgahw/vgaCmap.c
index 4720f4d..83c29c3 100644
--- a/hw/xfree86/vgahw/vgaCmap.c
+++ b/hw/xfree86/vgahw/vgaCmap.c
@@ -51,7 +51,7 @@ vgaListInstalledColormaps(pScreen, pmaps)
* is always a colormap installed */
*pmaps = GetInstalledmiColormap(pScreen)->mid;
- return(1);
+ return 1;
}
int
@@ -63,7 +63,7 @@ vgaGetInstalledColormaps(pScreen, pmaps)
* is always a colormap installed */
*pmaps = GetInstalledmiColormap(pScreen);
- return(1);
+ return 1;
}
int vgaCheckColorMap(ColormapPtr pmap)
diff --git a/hw/xfree86/vgahw/vgaHW.c b/hw/xfree86/vgahw/vgaHW.c
index b6832c3..ee045d1 100644
--- a/hw/xfree86/vgahw/vgaHW.c
+++ b/hw/xfree86/vgahw/vgaHW.c
@@ -658,7 +658,7 @@ vgaHWSaveScreen(ScreenPtr pScreen, int mode)
if ((pScrn != NULL) && pScrn->vtSema) {
vgaHWBlankScreen(pScrn, on);
}
- return (TRUE);
+ return TRUE;
}
@@ -1351,7 +1351,7 @@ vgaHWInit(ScrnInfoPtr scrninfp, DisplayModePtr mode)
regp->Attribute[19] = 0x00;
regp->Attribute[20] = 0x00;
- return(TRUE);
+ return TRUE;
}
/*
diff --git a/hw/xfree86/xaa/xaaFillRect.c b/hw/xfree86/xaa/xaaFillRect.c
index dde31c1..e1fecab 100644
--- a/hw/xfree86/xaa/xaaFillRect.c
+++ b/hw/xfree86/xaa/xaaFillRect.c
@@ -1090,6 +1090,6 @@ XAAGetRectClipBoxes(
}
}
- return(pboxClipped - pboxClippedBase);
+ return pboxClipped - pboxClippedBase;
}
diff --git a/hw/xfree86/xaa/xaaNonTEText.c b/hw/xfree86/xaa/xaaNonTEText.c
index a7fcf7a..7bfddcb 100644
--- a/hw/xfree86/xaa/xaaNonTEText.c
+++ b/hw/xfree86/xaa/xaaNonTEText.c
@@ -82,7 +82,7 @@ XAAPolyText8NonTEColorExpansion(
infoRec->CharInfo);
}
- return (x + width);
+ return x + width;
}
@@ -112,7 +112,7 @@ XAAPolyText16NonTEColorExpansion(
infoRec->CharInfo);
}
- return (x + width);
+ return x + width;
}
diff --git a/hw/xnest/Events.c b/hw/xnest/Events.c
index 194ec63..62e17cb 100644
--- a/hw/xnest/Events.c
+++ b/hw/xnest/Events.c
@@ -67,7 +67,7 @@ SetTimeSinceLastInputEvent(void)
static Bool
xnestExposurePredicate(Display *display, XEvent *event, char *args)
{
- return (event->type == Expose || event->type == ProcessedExpose);
+ return event->type == Expose || event->type == ProcessedExpose;
}
static Bool
diff --git a/hw/xnest/GCOps.c b/hw/xnest/GCOps.c
index 6b76fc2..829b86b 100644
--- a/hw/xnest/GCOps.c
+++ b/hw/xnest/GCOps.c
@@ -117,7 +117,7 @@ xnestGetImage(DrawablePtr pDrawable, int x, int y, int w, int h,
static Bool
xnestBitBlitPredicate(Display *display, XEvent *event, char *args)
{
- return (event->type == GraphicsExpose || event->type == NoExpose);
+ return event->type == GraphicsExpose || event->type == NoExpose;
}
static RegionPtr
@@ -158,7 +158,7 @@ xnestBitBlitHelper(GCPtr pGC)
RegionDestroy(pTmpReg);
RegionValidate(pReg, &overlap);
- return(pReg);
+ return pReg;
}
}
diff --git a/hw/xnest/Pixmap.c b/hw/xnest/Pixmap.c
index a0968b9..3a92ffd 100644
--- a/hw/xnest/Pixmap.c
+++ b/hw/xnest/Pixmap.c
@@ -133,5 +133,5 @@ xnestPixmapToRegion(PixmapPtr pPixmap)
RegionValidate(pReg, &overlap);
- return(pReg);
+ return pReg;
}
diff --git a/hw/xquartz/darwinXinput.c b/hw/xquartz/darwinXinput.c
index 90e440e..19aefb1 100644
--- a/hw/xquartz/darwinXinput.c
+++ b/hw/xquartz/darwinXinput.c
@@ -210,14 +210,14 @@ ChangeDeviceControl(ClientPtr client, DeviceIntPtr dev,
DEBUG_LOG("ChangeDeviceControl(%p, %p, %p)\n", client, dev, control);
switch (control->control) {
case DEVICE_RESOLUTION:
- return (BadMatch);
+ return BadMatch;
case DEVICE_ABS_CALIB:
case DEVICE_ABS_AREA:
- return (BadMatch);
+ return BadMatch;
case DEVICE_CORE:
- return (BadMatch);
+ return BadMatch;
default:
- return (BadMatch);
+ return BadMatch;
}
}
diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c
index 63a185f..6f7bbfd 100644
--- a/hw/xquartz/mach-startup/bundle-main.c
+++ b/hw/xquartz/mach-startup/bundle-main.c
@@ -641,7 +641,7 @@ static int execute(const char *command) {
execvp (newargv[0], (char * const *) newargv);
perror ("X11.app: Couldn't exec.");
- return(1);
+ return 1;
}
static char *command_from_prefs(const char *key, const char *default_value) {
diff --git a/hw/xquartz/xpr/dri.c b/hw/xquartz/xpr/dri.c
index 72a7ecf..dc78003 100644
--- a/hw/xquartz/xpr/dri.c
+++ b/hw/xquartz/xpr/dri.c
@@ -289,7 +289,7 @@ DRIExtensionInit(void)
DRIDrawablePrivResType = CreateNewResourceType(DRIDrawablePrivDelete,
"DRIDrawable");
- return (DRIDrawablePrivResType != 0);
+ return DRIDrawablePrivResType != 0;
}
void
diff --git a/hw/xwin/winconfig.c b/hw/xwin/winconfig.c
index e336237..a88b6f1 100644
--- a/hw/xwin/winconfig.c
+++ b/hw/xwin/winconfig.c
@@ -730,7 +730,7 @@ winNameCompare (const char *s1, const char *s2)
c1 = (isupper (*s1) ? tolower (*s1) : *s1);
c2 = (isupper (*s2) ? tolower (*s2) : *s2);
}
- return (c1 - c2);
+ return c1 - c2;
}
@@ -765,11 +765,11 @@ winFindOptionValue (XF86OptionPtr list, const char *name)
if (list)
{
if (list->opt_val)
- return (list->opt_val);
+ return list->opt_val;
else
return "";
}
- return (NULL);
+ return NULL;
}
diff --git a/include/dix.h b/include/dix.h
index 3d09bbe..a282a08 100644
--- a/include/dix.h
+++ b/include/dix.h
@@ -83,7 +83,7 @@ SOFTWARE.
if (!LegalNewID(id,client)) \
{\
client->errorValue = id;\
- return(BadIDChoice);\
+ return BadIDChoice;\
}
#define VALIDATE_DRAWABLE_AND_GC(drawID, pDraw, mode)\
@@ -95,7 +95,7 @@ SOFTWARE.
if (rc != Success)\
return rc;\
if ((pGC->depth != pDraw->depth) || (pGC->pScreen != pDraw->pScreen))\
- return (BadMatch);\
+ return BadMatch;\
}\
if (pGC->serialNumber != pDraw->serialNumber)\
ValidateGC(pDraw, pGC);
diff --git a/mi/miarc.c b/mi/miarc.c
index db21165..881e0db 100644
--- a/mi/miarc.c
+++ b/mi/miarc.c
@@ -1561,7 +1561,7 @@ miGetArcPts(
cdt = 2 * miDcos(dt);
if (!(poly = (SppPointPtr) realloc((pointer)*ppPts,
(cpt + count) * sizeof(SppPointRec))))
- return(0);
+ return 0;
*ppPts = poly;
xc = parc->width/2.0; /* store half width and half height */
@@ -1598,7 +1598,7 @@ miGetArcPts(
poly[cpt +i -1].y = (miDsin(st + et) * parc->height/2.0 + yc);
}
- return(count);
+ return count;
}
struct arcData {
diff --git a/mi/mibitblt.c b/mi/mibitblt.c
index 98857e8..49e17bd 100644
--- a/mi/mibitblt.c
+++ b/mi/mibitblt.c
@@ -379,7 +379,7 @@ miGetPlane(
pOut += delta;
}
}
- return(result);
+ return result;
}
diff --git a/mi/micmap.c b/mi/micmap.c
index 3effe6c..8d76f4d 100644
--- a/mi/micmap.c
+++ b/mi/micmap.c
@@ -47,7 +47,7 @@ miListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps)
{
if (GetInstalledmiColormap(pScreen)) {
*pmaps = GetInstalledmiColormap(pScreen)->mid;
- return (1);
+ return 1;
}
return 0;
}
diff --git a/mi/mifpolycon.c b/mi/mifpolycon.c
index 1be0150..e48686a 100644
--- a/mi/mifpolycon.c
+++ b/mi/mifpolycon.c
@@ -276,5 +276,5 @@ GetFPolyYBounds(
*by = ICEIL(ymin + yFtrans);
*ty = ICEIL(ymax + yFtrans - 1);
- return(ptMin-ptsStart);
+ return ptMin-ptsStart;
}
diff --git a/mi/mioverlay.c b/mi/mioverlay.c
index e7a9401..766c5e7 100644
--- a/mi/mioverlay.c
+++ b/mi/mioverlay.c
@@ -444,7 +444,7 @@ miOverlayMarkOverlappedWindows(
MIOVERLAY_GET_SCREEN_PRIVATE(pScreen)->underlayMarked = TRUE;
}
- return (underMarked || overMarked);
+ return underMarked || overMarked;
}
diff --git a/mi/mipolycon.c b/mi/mipolycon.c
index 2404c56..c201e39 100644
--- a/mi/mipolycon.c
+++ b/mi/mipolycon.c
@@ -104,14 +104,14 @@ miFillConvexPoly(
dy = ymax - ymin + 1;
if ((count < 3) || (dy < 0))
- return(TRUE);
+ return TRUE;
ptsOut = FirstPoint = malloc(sizeof(DDXPointRec)*dy);
width = FirstWidth = malloc(sizeof(int) * dy);
if(!FirstPoint || !FirstWidth)
{
free(FirstWidth);
free(FirstPoint);
- return(FALSE);
+ return FALSE;
}
nextleft = nextright = imin;
@@ -177,7 +177,7 @@ miFillConvexPoly(
{
free(FirstWidth);
free(FirstPoint);
- return(TRUE);
+ return TRUE;
}
while (i-- > 0)
{
@@ -212,7 +212,7 @@ miFillConvexPoly(
1);
free(FirstWidth);
free(FirstPoint);
- return(TRUE);
+ return TRUE;
}
@@ -243,5 +243,5 @@ getPolyYBounds(DDXPointPtr pts, int n, int *by, int *ty)
*by = ymin;
*ty = ymax;
- return(ptMin-ptsStart);
+ return ptMin-ptsStart;
}
diff --git a/mi/mipolygen.c b/mi/mipolygen.c
index d975165..7c7c593 100644
--- a/mi/mipolygen.c
+++ b/mi/mipolygen.c
@@ -90,16 +90,16 @@ miFillGeneralPoly(
int fixWAET = 0;
if (count < 3)
- return(TRUE);
+ return TRUE;
if(!(pETEs = malloc(sizeof(EdgeTableEntry) * count)))
- return(FALSE);
+ return FALSE;
ptsOut = FirstPoint;
width = FirstWidth;
if (!miCreateETandAET(count, ptsIn, &ET, &AET, pETEs, &SLLBlock))
{
free(pETEs);
- return(FALSE);
+ return FALSE;
}
pSLL = ET.scanlines.next;
@@ -226,5 +226,5 @@ miFillGeneralPoly(
(*pgc->ops->FillSpans)(dst, pgc, nPts, FirstPoint, FirstWidth, 1);
free(pETEs);
miFreeStorage(SLLBlock.next);
- return(TRUE);
+ return TRUE;
}
diff --git a/mi/mipolyutil.c b/mi/mipolyutil.c
index c4ce882..d978ee8 100644
--- a/mi/mipolyutil.c
+++ b/mi/mipolyutil.c
@@ -365,7 +365,7 @@ miInsertionSort(EdgeTableEntry *AET)
changed = 1;
}
}
- return(changed);
+ return changed;
}
/*
diff --git a/mi/mivaltree.c b/mi/mivaltree.c
index 7e0c22a..0e00c2f 100644
--- a/mi/mivaltree.c
+++ b/mi/mivaltree.c
@@ -809,5 +809,5 @@ miValidateTree (
RegionUninit(&exposed);
if (pScreen->ClipNotify)
(*pScreen->ClipNotify) (pParent, 0, 0);
- return (1);
+ return 1;
}
diff --git a/mi/miwideline.c b/mi/miwideline.c
index 5f3d582..b11b40b 100644
--- a/mi/miwideline.c
+++ b/mi/miwideline.c
@@ -717,7 +717,7 @@ miLineArcI (
*--bwids = slw;
}
}
- return (pGC->lineWidth);
+ return pGC->lineWidth;
}
#define CLIPSTEPEDGE(edgey,edge,edgeleft) \
@@ -911,7 +911,7 @@ miLineArcD (
*wids++ = xcr - xcl + 1;
}
}
- return (pts - points);
+ return pts - points;
}
static int
diff --git a/miext/rootless/rootlessGC.c b/miext/rootless/rootlessGC.c
index 0bd314d..6af8d85 100644
--- a/miext/rootless/rootlessGC.c
+++ b/miext/rootless/rootlessGC.c
@@ -1276,7 +1276,7 @@ static int RootlessPolyText8(DrawablePtr dst, GCPtr pGC,
GCOP_WRAP(pGC);
RL_DEBUG_MSG("polytext8 end\n");
- return (width + x);
+ return width + x;
}
static void RootlessImageText16(DrawablePtr dst, GCPtr pGC,
diff --git a/os/access.c b/os/access.c
index 36e1b81..5f485c9 100644
--- a/os/access.c
+++ b/os/access.c
@@ -329,7 +329,7 @@ ifioctl (int fd, int cmd, char *arg)
#ifdef SVR4
((struct ifconf *) arg)->ifc_len = ioc.ic_len;
#endif
- return(ret);
+ return ret;
}
#else /* Case sun, SCO325 and others */
#define ifioctl ioctl
@@ -1343,13 +1343,13 @@ AddHost (ClientPtr client,
if ((len = CheckAddr (family, pAddr, length)) < 0)
{
client->errorValue = length;
- return (BadValue);
+ return BadValue;
}
break;
case FamilyLocal:
default:
client->errorValue = family;
- return (BadValue);
+ return BadValue;
}
if (NewHost (family, pAddr, len, FALSE))
return Success;
@@ -1441,13 +1441,13 @@ RemoveHost (
if ((len = CheckAddr (family, pAddr, length)) < 0)
{
client->errorValue = length;
- return(BadValue);
+ return BadValue;
}
break;
case FamilyLocal:
default:
client->errorValue = family;
- return(BadValue);
+ return BadValue;
}
for (prev = &validhosts;
(host = *prev) && (!addrEqual (family, pAddr, len, host));
@@ -1458,7 +1458,7 @@ RemoveHost (
*prev = host->next;
FreeHost (host);
}
- return (Success);
+ return Success;
}
/* Get all hosts in the access control list */
@@ -1486,7 +1486,7 @@ GetHosts (
*data = ptr = malloc(n);
if (!ptr)
{
- return(BadAlloc);
+ return BadAlloc;
}
for (host = validhosts; host; host = host->next)
{
@@ -1502,7 +1502,7 @@ GetHosts (
}
*pnHosts = nHosts;
*pLen = n;
- return(Success);
+ return Success;
}
/* Check for valid address family and length, and return address length. */
@@ -1555,7 +1555,7 @@ CheckAddr (
default:
len = -1;
}
- return (len);
+ return len;
}
/* Check if a host is not in the access control list.
@@ -1572,7 +1572,7 @@ InvalidHost (
register HOST *selfhost, *host;
if (!AccessEnabled) /* just let them in */
- return(0);
+ return 0;
family = ConvertAddr (saddr, &len, (pointer *)&addr);
if (family == -1)
return 1;
@@ -1600,15 +1600,15 @@ InvalidHost (
{
if ((host->family == FamilyServerInterpreted)) {
if (siAddrMatch (family, addr, len, host, client)) {
- return (0);
+ return 0;
}
} else {
if (addrEqual (family, addr, len, host))
- return (0);
+ return 0;
}
}
- return (1);
+ return 1;
}
static int
@@ -1618,7 +1618,7 @@ ConvertAddr (
pointer *addr)
{
if (*len == 0)
- return (FamilyLocal);
+ return FamilyLocal;
switch (saddr->sa_family)
{
case AF_UNSPEC:
diff --git a/os/connection.c b/os/connection.c
index 293f31a..cd0ca5e 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -267,7 +267,7 @@ lookup_trans_conn (int fd)
return ListenTransConns[i];
}
- return (NULL);
+ return NULL;
}
/* Set MaxClients and lastfdesc, and allocate ConnectionTranslation */
diff --git a/os/io.c b/os/io.c
index 02e1ca3..b5f98b7 100644
--- a/os/io.c
+++ b/os/io.c
@@ -508,7 +508,7 @@ InsertFakeRequest(ClientPtr client, char *data, int count)
ibuf = (char *)realloc(oci->buffer, gotnow + count);
if (!ibuf)
- return(FALSE);
+ return FALSE;
oci->size = gotnow + count;
oci->buffer = ibuf;
oci->bufptr = ibuf + oci->bufcnt - gotnow;
@@ -529,7 +529,7 @@ InsertFakeRequest(ClientPtr client, char *data, int count)
FD_SET(fd, &ClientsWithInput);
else
YieldControlNoInput(fd);
- return(TRUE);
+ return TRUE;
}
/*****************************************************************
@@ -706,7 +706,7 @@ WriteToClient (ClientPtr who, int count, const void *__buf)
Bool multicount = FALSE;
#endif
if (!count || !who || who == serverClient || who->clientGone)
- return(0);
+ return 0;
oc = who->osPrivate;
oco = oc->output;
#ifdef DEBUG_COMMUNICATION
@@ -826,7 +826,7 @@ WriteToClient (ClientPtr who, int count, const void *__buf)
FD_SET(oc->fd, &OutputPending);
memmove((char *)oco->buf + oco->count, buf, count);
oco->count += count + padBytes;
- return(count);
+ return count;
}
/********************
@@ -948,7 +948,7 @@ FlushClient(ClientPtr who, OsCommPtr oc, const void *__extraBuf, int extraCount)
oc->trans_conn = NULL;
MarkClientException(who);
oco->count = 0;
- return(-1);
+ return -1;
}
oco->size = notWritten + BUFSIZE;
oco->buf = obuf;
@@ -981,7 +981,7 @@ FlushClient(ClientPtr who, OsCommPtr oc, const void *__extraBuf, int extraCount)
}
MarkClientException(who);
oco->count = 0;
- return(-1);
+ return -1;
}
}
diff --git a/os/strcasecmp.c b/os/strcasecmp.c
index ca1051d..ad6da6a 100644
--- a/os/strcasecmp.c
+++ b/os/strcasecmp.c
@@ -42,7 +42,7 @@ xstrcasecmp(const char *str1, const char *str2)
while (tolower(*us1) == tolower(*us2)) {
if (*us1++ == '\0')
- return (0);
+ return 0;
us2++;
}
diff --git a/os/strcasestr.c b/os/strcasestr.c
index b3d4549..f89b2f2 100644
--- a/os/strcasestr.c
+++ b/os/strcasestr.c
@@ -54,7 +54,7 @@ xstrcasestr(const char *s, const char *find)
do {
do {
if ((sc = *s++) == 0)
- return (NULL);
+ return NULL;
} while ((char)tolower((unsigned char)sc) != c);
} while (strncasecmp(s, find, len) != 0);
s--;
diff --git a/os/strlcpy.c b/os/strlcpy.c
index aa9d042..e8e1b02 100644
--- a/os/strlcpy.c
+++ b/os/strlcpy.c
@@ -50,5 +50,5 @@ strlcpy(char *dst, const char *src, size_t siz)
;
}
- return(s - src - 1); /* count does not include NUL */
+ return s - src - 1; /* count does not include NUL */
}
diff --git a/os/utils.c b/os/utils.c
index b4a954f..92bfad3 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -548,12 +548,12 @@ void UseMsg(void)
static int
VerifyDisplayName(const char *d)
{
- if ( d == (char *)0 ) return( 0 ); /* null */
- if ( *d == '\0' ) return( 0 ); /* empty */
- if ( *d == '-' ) return( 0 ); /* could be confused for an option */
- if ( *d == '.' ) return( 0 ); /* must not equal "." or ".." */
- if ( strchr(d, '/') != (char *)0 ) return( 0 ); /* very important!!! */
- return( 1 );
+ if ( d == (char *)0 ) return 0; /* null */
+ if ( *d == '\0' ) return 0; /* empty */
+ if ( *d == '-' ) return 0; /* could be confused for an option */
+ if ( *d == '.' ) return 0; /* must not equal "." or ".." */
+ if ( strchr(d, '/') != (char *)0 ) return 0; /* very important!!! */
+ return 1;
}
/*
@@ -1284,7 +1284,7 @@ System(char *command)
int status;
if (!command)
- return(1);
+ return 1;
#ifdef SIGCHLD
csig = signal(SIGCHLD, SIG_DFL);
diff --git a/os/xdmcp.c b/os/xdmcp.c
index e03f17e..8fd903f 100644
--- a/os/xdmcp.c
+++ b/os/xdmcp.c
@@ -251,48 +251,48 @@ XdmcpOptions(int argc, char **argv, int i)
get_manager_by_name(argc, argv, i++);
XDM_INIT_STATE = XDM_QUERY;
AccessUsingXdmcp ();
- return (i + 1);
+ return i + 1;
}
if (strcmp(argv[i], "-broadcast") == 0) {
XDM_INIT_STATE = XDM_BROADCAST;
AccessUsingXdmcp ();
- return (i + 1);
+ return i + 1;
}
#if defined(IPv6) && defined(AF_INET6)
if (strcmp(argv[i], "-multicast") == 0) {
i = get_mcast_options(argc, argv, ++i);
XDM_INIT_STATE = XDM_MULTICAST;
AccessUsingXdmcp ();
- return (i + 1);
+ return i + 1;
}
#endif
if (strcmp(argv[i], "-indirect") == 0) {
get_manager_by_name(argc, argv, i++);
XDM_INIT_STATE = XDM_INDIRECT;
AccessUsingXdmcp ();
- return (i + 1);
+ return i + 1;
}
if (strcmp(argv[i], "-port") == 0) {
if (++i == argc) {
FatalError("Xserver: missing port number in command line\n");
}
xdm_udp_port = (unsigned short) atoi(argv[i]);
- return (i + 1);
+ return i + 1;
}
if (strcmp(argv[i], "-from") == 0) {
get_fromaddr_by_name(argc, argv, ++i);
- return (i + 1);
+ return i + 1;
}
if (strcmp(argv[i], "-once") == 0) {
OneSession = TRUE;
- return (i + 1);
+ return i + 1;
}
if (strcmp(argv[i], "-class") == 0) {
if (++i == argc) {
FatalError("Xserver: missing class name in command line\n");
}
defaultDisplayClass = argv[i];
- return (i + 1);
+ return i + 1;
}
#ifdef HASXDMAUTH
if (strcmp(argv[i], "-cookie") == 0) {
@@ -300,7 +300,7 @@ XdmcpOptions(int argc, char **argv, int i)
FatalError("Xserver: missing cookie data in command line\n");
}
xdmAuthCookie = argv[i];
- return (i + 1);
+ return i + 1;
}
#endif
if (strcmp(argv[i], "-displayID") == 0) {
@@ -308,9 +308,9 @@ XdmcpOptions(int argc, char **argv, int i)
FatalError("Xserver: missing displayID in command line\n");
}
XdmcpRegisterManufacturerDisplayID (argv[i], strlen (argv[i]));
- return (i + 1);
+ return i + 1;
}
- return (i);
+ return i;
}
/*
diff --git a/randr/rrproperty.c b/randr/rrproperty.c
index 97e063c..231b906 100644
--- a/randr/rrproperty.c
+++ b/randr/rrproperty.c
@@ -137,7 +137,7 @@ RRChangeOutputProperty (RROutputPtr output, Atom property, Atom type,
{
prop = RRCreateOutputProperty (property);
if (!prop)
- return(BadAlloc);
+ return BadAlloc;
add = TRUE;
mode = PropModeReplace;
}
@@ -152,9 +152,9 @@ RRChangeOutputProperty (RROutputPtr output, Atom property, Atom type,
"PropModeReplace" since they will be written over. */
if ((format != prop_value->format) && (mode != PropModeReplace))
- return(BadMatch);
+ return BadMatch;
if ((prop_value->type != type) && (mode != PropModeReplace))
- return(BadMatch);
+ return BadMatch;
new_value = *prop_value;
if (mode == PropModeReplace)
total_len = len;
@@ -204,7 +204,7 @@ RRChangeOutputProperty (RROutputPtr output, Atom property, Atom type,
prop->propertyName, &new_value))
{
free(new_value.data);
- return (BadValue);
+ return BadValue;
}
free(prop_value->data);
*prop_value = new_value;
@@ -234,7 +234,7 @@ RRChangeOutputProperty (RROutputPtr output, Atom property, Atom type,
event.timestamp = currentTime.milliseconds;
RRDeliverPropertyEvent (output->pScreen, (xEvent *)&event);
}
- return(Success);
+ return Success;
}
Bool
@@ -324,10 +324,10 @@ RRConfigureOutputProperty (RROutputPtr output, Atom property,
{
prop = RRCreateOutputProperty (property);
if (!prop)
- return(BadAlloc);
+ return BadAlloc;
add = TRUE;
} else if (prop->immutable && !immutable)
- return(BadAccess);
+ return BadAccess;
/*
* ranges must have even number of values
@@ -387,7 +387,7 @@ ProcRRListOutputProperties (ClientPtr client)
numProps++;
if (numProps)
if(!(pAtoms = (Atom *)malloc(numProps * sizeof(Atom))))
- return(BadAlloc);
+ return BadAlloc;
rep.type = X_Reply;
rep.length = bytes_to_int32(numProps * sizeof(Atom));
@@ -516,12 +516,12 @@ ProcRRChangeOutputProperty (ClientPtr client)
if (!ValidAtom(stuff->property))
{
client->errorValue = stuff->property;
- return(BadAtom);
+ return BadAtom;
}
if (!ValidAtom(stuff->type))
{
client->errorValue = stuff->type;
- return(BadAtom);
+ return BadAtom;
}
err = RRChangeOutputProperty(output, stuff->property,
@@ -546,7 +546,7 @@ ProcRRDeleteOutputProperty (ClientPtr client)
if (!ValidAtom(stuff->property))
{
client->errorValue = stuff->property;
- return (BadAtom);
+ return BadAtom;
}
@@ -574,17 +574,17 @@ ProcRRGetOutputProperty (ClientPtr client)
if (!ValidAtom(stuff->property))
{
client->errorValue = stuff->property;
- return(BadAtom);
+ return BadAtom;
}
if ((stuff->delete != xTrue) && (stuff->delete != xFalse))
{
client->errorValue = stuff->delete;
- return(BadValue);
+ return BadValue;
}
if ((stuff->type != AnyPropertyType) && !ValidAtom(stuff->type))
{
client->errorValue = stuff->type;
- return(BadAtom);
+ return BadAtom;
}
for (prev = &output->properties; (prop = *prev); prev = &prop->next)
diff --git a/render/render.c b/render/render.c
index 40401a4..ef233e4 100644
--- a/render/render.c
+++ b/render/render.c
@@ -852,7 +852,7 @@ ProcRenderTriStrip (ClientPtr client)
pFormat = 0;
npoints = ((client->req_len << 2) - sizeof (xRenderTriStripReq));
if (npoints & 4)
- return(BadLength);
+ return BadLength;
npoints >>= 3;
if (npoints >= 3)
CompositeTriStrip (stuff->op, pSrc, pDst, pFormat,
@@ -892,7 +892,7 @@ ProcRenderTriFan (ClientPtr client)
pFormat = 0;
npoints = ((client->req_len << 2) - sizeof (xRenderTriStripReq));
if (npoints & 4)
- return(BadLength);
+ return BadLength;
npoints >>= 3;
if (npoints >= 3)
CompositeTriFan (stuff->op, pSrc, pDst, pFormat,
@@ -1461,7 +1461,7 @@ ProcRenderFillRectangles (ClientPtr client)
things = (client->req_len << 2) - sizeof(xRenderFillRectanglesReq);
if (things & 4)
- return(BadLength);
+ return BadLength;
things >>= 3;
CompositeRects (stuff->op,
@@ -1530,10 +1530,10 @@ ProcRenderCreateCursor (ClientPtr client)
return BadAlloc;
if ( stuff->x > width
|| stuff->y > height )
- return (BadMatch);
+ return BadMatch;
argbbits = malloc(width * height * sizeof (CARD32));
if (!argbbits)
- return (BadAlloc);
+ return BadAlloc;
stride = BitmapBytePad(width);
nbytes_mono = stride*height;
@@ -1541,14 +1541,14 @@ ProcRenderCreateCursor (ClientPtr client)
if (!srcbits)
{
free(argbbits);
- return (BadAlloc);
+ return BadAlloc;
}
mskbits = calloc(1, nbytes_mono);
if (!mskbits)
{
free(argbbits);
free(srcbits);
- return (BadAlloc);
+ return BadAlloc;
}
if (pSrc->format == PICT_a8r8g8b8)
@@ -1570,7 +1570,7 @@ ProcRenderCreateCursor (ClientPtr client)
free(argbbits);
free(srcbits);
free(mskbits);
- return (BadImplementation);
+ return BadImplementation;
}
pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, 32,
CREATE_PIXMAP_USAGE_SCRATCH);
@@ -1579,7 +1579,7 @@ ProcRenderCreateCursor (ClientPtr client)
free(argbbits);
free(srcbits);
free(mskbits);
- return (BadAlloc);
+ return BadAlloc;
}
pPicture = CreatePicture (0, &pPixmap->drawable, pFormat, 0, 0,
client, &error);
@@ -2703,7 +2703,7 @@ PanoramiXRenderCreatePicture (ClientPtr client)
else
free(newPict);
- return (result);
+ return result;
}
static int
@@ -2723,7 +2723,7 @@ PanoramiXRenderChangePicture (ClientPtr client)
if(result != Success) break;
}
- return (result);
+ return result;
}
static int
@@ -2743,7 +2743,7 @@ PanoramiXRenderSetPictureClipRectangles (ClientPtr client)
if(result != Success) break;
}
- return (result);
+ return result;
}
static int
@@ -2763,7 +2763,7 @@ PanoramiXRenderSetPictureTransform (ClientPtr client)
if(result != Success) break;
}
- return (result);
+ return result;
}
static int
@@ -2783,7 +2783,7 @@ PanoramiXRenderSetPictureFilter (ClientPtr client)
if(result != Success) break;
}
- return (result);
+ return result;
}
static int
@@ -2809,7 +2809,7 @@ PanoramiXRenderFreePicture (ClientPtr client)
/* Since ProcRenderFreePicture is using FreeResource, it will free
our resource for us on the last pass through the loop above */
- return (result);
+ return result;
}
static int
diff --git a/xfixes/cursor.c b/xfixes/cursor.c
index a9f089f..41ba0fb 100644
--- a/xfixes/cursor.c
+++ b/xfixes/cursor.c
@@ -269,7 +269,7 @@ ProcXFixesSelectCursorInput (ClientPtr client)
if (stuff->eventMask & ~CursorAllEvents)
{
client->errorValue = stuff->eventMask;
- return( BadValue );
+ return BadValue;
}
return XFixesSelectCursorInput (client, pWin, stuff->eventMask);
}
@@ -732,7 +732,7 @@ static Bool
TestForCursorName (CursorPtr pCursor, pointer closure)
{
Atom *pName = closure;
- return (pCursor->name == *pName);
+ return pCursor->name == *pName;
}
int
diff --git a/xfixes/region.c b/xfixes/region.c
index 4a3ec33..42d5d7c 100644
--- a/xfixes/region.c
+++ b/xfixes/region.c
@@ -63,7 +63,7 @@ XFixesRegionInit (void)
{
RegionResType = CreateNewResourceType(RegionResFree, "XFixesRegion");
- return (RegionResType != 0);
+ return RegionResType != 0;
}
int
diff --git a/xfixes/saveset.c b/xfixes/saveset.c
index 3c0504f..35d8e17 100644
--- a/xfixes/saveset.c
+++ b/xfixes/saveset.c
@@ -43,17 +43,17 @@ ProcXFixesChangeSaveSet(ClientPtr client)
if ((stuff->mode != SetModeInsert) && (stuff->mode != SetModeDelete))
{
client->errorValue = stuff->mode;
- return( BadValue );
+ return BadValue;
}
if ((stuff->target != SaveSetNearest) && (stuff->target != SaveSetRoot))
{
client->errorValue = stuff->target;
- return( BadValue );
+ return BadValue;
}
if ((stuff->map != SaveSetMap) && (stuff->map != SaveSetUnmap))
{
client->errorValue = stuff->map;
- return( BadValue );
+ return BadValue;
}
toRoot = (stuff->target == SaveSetRoot);
map = (stuff->map == SaveSetMap);
diff --git a/xfixes/select.c b/xfixes/select.c
index 3aa26d3..baf1ef8 100644
--- a/xfixes/select.c
+++ b/xfixes/select.c
@@ -211,7 +211,7 @@ ProcXFixesSelectSelectionInput (ClientPtr client)
if (stuff->eventMask & ~SelectionAllEvents)
{
client->errorValue = stuff->eventMask;
- return( BadValue );
+ return BadValue;
}
return XFixesSelectSelectionInput (client, stuff->selection,
pWin, stuff->eventMask);
diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c
index be1dcee..b5486b7 100644
--- a/xkb/xkbAccessX.c
+++ b/xkb/xkbAccessX.c
@@ -394,7 +394,7 @@ XkbSrvLedInfoPtr sli;
unsigned timeElapsed = (now-xkbi->lastPtrEventTime);
if (timeToWait > timeElapsed)
- return (timeToWait - timeElapsed);
+ return timeToWait - timeElapsed;
}
old= *ctrls;
xkbi->shiftKeyCount= 0;
diff --git a/xkb/xkbLEDs.c b/xkb/xkbLEDs.c
index ae3666f..f617537 100644
--- a/xkb/xkbLEDs.c
+++ b/xkb/xkbLEDs.c
@@ -166,7 +166,7 @@ XkbStatePtr state;
}
}
}
- return (stateChange || ctrlChange);
+ return stateChange || ctrlChange;
}
/*
diff --git a/xkb/xkbfmisc.c b/xkb/xkbfmisc.c
index 103e609..7aa9863 100644
--- a/xkb/xkbfmisc.c
+++ b/xkb/xkbfmisc.c
@@ -437,5 +437,5 @@ XkbNameMatchesPattern(char *name,char *ptrn)
ptrn++;
}
/* if we get here, the pattern is exhausted (-:just like me:-) */
- return (name[0]=='\0');
+ return name[0]=='\0';
}
--
1.7.1
More information about the xorg-devel
mailing list