dix: use BUG_RETURN_VAL for an error message
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 10 Jan 2013 22:52:08 +0000 (08:52 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Fri, 8 Feb 2013 04:00:56 +0000 (14:00 +1000)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
dix/ptrveloc.c

index 6994bd5..b6d2dae 100644 (file)
@@ -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 &&