linuxwacom / xf86-input-wacom

X.Org driver for Wacom devices
356 stars 45 forks source link

Fix wcmForeachDevice check in wcmMatchDevice #343

Closed whot closed 4 months ago

whot commented 4 months ago

wcmForeachDevice returns 0 for no matches, a negative errno or the greater-than-zero number of matches. In wcmMatchDevice we return either 0 or 1 as matchDevice() stops the foreach once the first match is encountered.

Fixes: d5ca999f35c7 ("Add a helper function to iterate over local devices to the driver layer") Closes #342

cc @omcaif