mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-22 01:20:26 +00:00
Remove unnecessary parentheses around return values in functions
This patch was generated by the following Perl code: perl -i -pe 's/([^_])return\s*\(\s*([^(]+?)\s*\)s*;(\s+(\n))?/$1return $2;$4/g;' Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
b3a7b229e1
commit
7287ef9e6c
145 changed files with 847 additions and 847 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -294,7 +294,7 @@ xf86CreateRootWindow(WindowPtr pWin)
|
|||
}
|
||||
|
||||
DebugF("xf86CreateRootWindow() returns %d\n", ret);
|
||||
return (ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -745,7 +745,7 @@ xf86IsOptionSet(const OptionInfoRec *table, int token)
|
|||
OptionInfoPtr p;
|
||||
|
||||
p = xf86TokenToOptinfo(table, token);
|
||||
return (p && p->found);
|
||||
return p && p->found;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -465,7 +465,7 @@ xf86PciAddMatchingDev(DriverPtr drvp)
|
|||
|
||||
pci_iterator_destroy(iter);
|
||||
|
||||
return (numFound != 0);
|
||||
return numFound != 0;
|
||||
}
|
||||
|
||||
Bool
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1220,7 +1220,7 @@ xf86XVQueryAdaptors(
|
|||
*p_nAdaptors = pxvs->nAdaptors;
|
||||
*p_pAdaptors = pxvs->pAdaptors;
|
||||
|
||||
return (Success);
|
||||
return Success;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Reference in a new issue