diff options
author | Jason Gerecke <jason.gerecke@wacom.com> | 2022-02-19 16:11:23 -0800 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2022-02-22 10:41:51 +1000 |
commit | b998b68107b4a9b6116b271c858dfbcb29435789 (patch) | |
tree | afc89f4dac5dd2fd27b2e47160296c8cdeed6672 | |
parent | 18ac7bc40be89ccc49ec9f17583503989944069d (diff) | |
download | xf86-input-wacom-b998b68107b4a9b6116b271c858dfbcb29435789.tar.gz |
Remove superflous 'invalid' label in wcmSetFlags
This label is only taken in a single error case. We should handle the
error at the point we detect it, not after jumping to yet another label.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
-rw-r--r-- | src/wcmConfig.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/wcmConfig.c b/src/wcmConfig.c index 5186bb3..973728a 100644 --- a/src/wcmConfig.c +++ b/src/wcmConfig.c @@ -155,7 +155,10 @@ wcmSetFlags(WacomDevicePtr priv, WacomType type) break; case WTYPE_INVALID: default: - goto invalid; + wcmLog(priv, W_ERROR, + "No type or invalid type specified.\n" + "Must be one of stylus, touch, cursor, eraser, or pad\n"); + return FALSE; } priv->flags = flags; @@ -169,13 +172,6 @@ wcmSetFlags(WacomDevicePtr priv, WacomType type) priv->tool->typeid = DEVICE_ID(flags); /* tool type (stylus/touch/eraser/cursor/pad) */ return TRUE; - -invalid: - wcmLog(priv, W_ERROR, - "No type or invalid type specified.\n" - "Must be one of stylus, touch, cursor, eraser, or pad\n"); - - return FALSE; } int wcmGetPhyDeviceID(WacomDevicePtr priv) |