mirror of
https://github.com/X11Libre/xf86-input-synaptics.git
synced 2026-03-24 01:34:04 +00:00
descriptive warning message instead of BUG_WARN() anymore
Since current xserver mainline dropped BUG_WARN() macro from os.h and we only use it twice, it's trivial to just print the warning directly and at that point make it a bit more descriptive. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-synaptics/-/merge_requests/12>
This commit is contained in:
committed by
Alan Coopersmith
parent
a0becc7957
commit
2a60fb4fb4
@@ -2937,7 +2937,12 @@ UpdateTouchState(InputInfoPtr pInfo, struct SynapticsHwState *hw)
|
||||
if (hw->slot_state[i] == SLOTSTATE_OPEN) {
|
||||
priv->open_slots[priv->num_active_touches] = i;
|
||||
priv->num_active_touches++;
|
||||
BUG_WARN(priv->num_active_touches > priv->num_slots);
|
||||
if (priv->num_active_touches > priv->num_slots) {
|
||||
ErrorFSigSafe("BUG: synaptics: more active touches (%d) than slots (%d)\n",
|
||||
priv->num_active_touches,
|
||||
priv->num_slots);
|
||||
xorg_backtrace();
|
||||
}
|
||||
}
|
||||
else if (hw->slot_state[i] == SLOTSTATE_CLOSE) {
|
||||
Bool found = FALSE;
|
||||
@@ -2951,7 +2956,11 @@ UpdateTouchState(InputInfoPtr pInfo, struct SynapticsHwState *hw)
|
||||
priv->open_slots[j] = priv->open_slots[j + 1];
|
||||
}
|
||||
|
||||
BUG_WARN(priv->num_active_touches == 0);
|
||||
if (priv->num_active_touches == 0) {
|
||||
ErrorFSigSafe("BUG: synaptics: no active touches where there should be at least one\n");
|
||||
xorg_backtrace();
|
||||
}
|
||||
|
||||
if (priv->num_active_touches > 0)
|
||||
priv->num_active_touches--;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user