Don't clobber speed when reporting an invalid value master oblomov/master
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Thu, 8 Feb 2018 19:14:24 +0000 (20:14 +0100)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Thu, 8 Feb 2018 19:14:24 +0000 (20:14 +0100)
Set the default _after_ printing the original value.

src/acecad.c

index 09fb403..90eebe7 100644 (file)
@@ -413,8 +413,8 @@ AceCadPreInit(InputDriverPtr drv, InputInfoPtr local, int flags)
                 break;
             default:
                 priv->acecadReportSpeed = 'R';
-                speed = 85;
                 xf86Msg(X_ERROR, "%s: ReportSpeed value %d invalid. Possible values: 120, 85, 10, 2. Defaulting to 85\n", local->name, speed);
+                speed = 85;
                 msgtype = X_DEFAULT;
         }