summaryrefslogtreecommitdiff
path: root/Xi
diff options
context:
space:
mode:
authorMikhail Gusarov <dottedmag@dottedmag.net>2010-06-06 21:18:40 +0700
committerKeith Packard <keithp@keithp.com>2010-06-10 06:42:42 -0700
commit7287ef9e6cf953066e4a092cca9d0e4a279172bf (patch)
treeb67414bd69d1a1afc881e224d2f04cd495eb81d2 /Xi
parentb3a7b229e1e1f212bdd185af5443311091824005 (diff)
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>
Diffstat (limited to 'Xi')
-rw-r--r--Xi/exevents.c8
-rw-r--r--Xi/getprop.c2
-rw-r--r--Xi/listdev.c2
-rw-r--r--Xi/opendev.c2
-rw-r--r--Xi/sendexev.c2
-rw-r--r--Xi/stubs.c8
-rw-r--r--Xi/xiproperty.c26
7 files changed, 25 insertions, 25 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c
index 56d9bf7fd..a609c7393 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 246045981..ba98fc80f 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 db7e5400e..3b2272bc3 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 3844d25a2..e4c02d32a 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 bd96d74c7..16cbd6f77 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 04ba9769e..296a8c4a5 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 c1839aab8..b9f53f7dc 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);