[PATCH 6/7] dix: use BUG_RETURN_VAL for an error message
Peter Hutterer
peter.hutterer at who-t.net
Wed Jan 16 23:20:03 PST 2013
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
dix/ptrveloc.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c
index 5a04ce8..b930451 100644
--- a/dix/ptrveloc.c
+++ b/dix/ptrveloc.c
@@ -1051,11 +1051,8 @@ SetDeviceSpecificAccelerationProfile(DeviceVelocityPtr vel,
DeviceVelocityPtr
GetDevicePredictableAccelData(DeviceIntPtr dev)
{
- /*sanity check */
- if (!dev) {
- ErrorF("[dix] accel: DeviceIntPtr was NULL");
- return NULL;
- }
+ BUG_RETURN_VAL(!dev, NULL);
+
if (dev->valuator &&
dev->valuator->accelScheme.AccelSchemeProc ==
acceleratePointerPredictable &&
--
1.8.1
More information about the xorg-devel
mailing list