summaryrefslogtreecommitdiff
path: root/src/XGetDCtl.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2013-05-28 15:52:33 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2013-06-27 05:37:18 +1000
commit35ae16dc2f16b24a22625b2d9f76a2128b673a6c (patch)
tree6badcfe8195d92c47623bbdcbbac43e7ff506996 /src/XGetDCtl.c
parent4c8e9bcab459ea5f870d3e56eff15f931807f9b7 (diff)
Change size += to size = in XGetDeviceControl
size += blah is technically correct but it implies that we're looping or otherwise incrementing the size. Which we don't, it's only ever set once. Change this to avoid reviewer confusion. Reported-by: Dave "color-me-confused" Airlie <airlied@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src/XGetDCtl.c')
-rw-r--r--src/XGetDCtl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/XGetDCtl.c b/src/XGetDCtl.c
index 51ed0ae..b576aa5 100644
--- a/src/XGetDCtl.c
+++ b/src/XGetDCtl.c
@@ -122,34 +122,34 @@ XGetDeviceControl(
val_size = 3 * sizeof(int) * r->num_valuators;
if ((sizeof(xDeviceResolutionState) + val_size) > nbytes)
goto out;
- size += sizeof(XDeviceResolutionState) + val_size;
+ size = sizeof(XDeviceResolutionState) + val_size;
break;
}
case DEVICE_ABS_CALIB:
{
if (sizeof(xDeviceAbsCalibState) > nbytes)
goto out;
- size += sizeof(XDeviceAbsCalibState);
+ size = sizeof(XDeviceAbsCalibState);
break;
}
case DEVICE_ABS_AREA:
{
if (sizeof(xDeviceAbsAreaState) > nbytes)
goto out;
- size += sizeof(XDeviceAbsAreaState);
+ size = sizeof(XDeviceAbsAreaState);
break;
}
case DEVICE_CORE:
{
if (sizeof(xDeviceCoreState) > nbytes)
goto out;
- size += sizeof(XDeviceCoreState);
+ size = sizeof(XDeviceCoreState);
break;
}
default:
if (d->length > nbytes)
goto out;
- size += d->length;
+ size = d->length;
break;
}