state: fix mod_names_are_active
authorRan Benita <ran234@gmail.com>
Thu, 30 Aug 2012 09:13:37 +0000 (12:13 +0300)
committerRan Benita <ran234@gmail.com>
Sun, 2 Sep 2012 16:17:09 +0000 (19:17 +0300)
commit06d7803a6d0f7dbcdb098d8e00122c097d40b80d
treea1fb53d4cc9f76899af2b2b9746625539788b61a
parent9f0c01606346e63861b52bfc7ed8cff964cf9699
state: fix mod_names_are_active

This function was always returning -1.
Adding a test, we see that test/state.c treat the is_active functions as
returning booleans, which would treat -1 as success, so we test for > 0
instead (most users would probably get this wrong as well...).
Also update the documentation for the are_active functions, and add a
ATTR_NULL_SENTINEL for gcc __attribute__((sentinel)).

Signed-off-by: Ran Benita <ran234@gmail.com>
src/state.c
src/utils.h
test/state.c
xkbcommon/xkbcommon.h