[PATCH:libX11 2/2] Clarify state parameter to XkbSetNamedDeviceIndicator

Alan Coopersmith alan.coopersmith at oracle.com
Sun Mar 19 19:32:23 UTC 2017


Checking a Bool to see if it's NULL does not work well in C.
Also reported in https://bugs.freedesktop.org/show_bug.cgi?id=251

Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 man/xkb/XkbSetNamedIndicator.man |  9 ++++++---
 specs/XKB/ch08.xml               | 10 ++++++----
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/man/xkb/XkbSetNamedIndicator.man b/man/xkb/XkbSetNamedIndicator.man
index 52716b0..81df50f 100644
--- a/man/xkb/XkbSetNamedIndicator.man
+++ b/man/xkb/XkbSetNamedIndicator.man
@@ -85,13 +85,16 @@ and returns True.
  
 If 
 .I change_state 
-is True, and the optional parameter, 
-.IR state ,
-is not NULL, 
+is True, 
 .I XkbSetNamedDeviceIndicator
 tells the server to change the state of the named indicator to the value 
 specified by 
 .IR state .
+If
+.I change_state
+is False, then
+.I state
+is not used.
 
 If an indicator with the name specified by 
 .I name 
diff --git a/specs/XKB/ch08.xml b/specs/XKB/ch08.xml
index 4e2872e..aa308c0 100644
--- a/specs/XKB/ch08.xml
+++ b/specs/XKB/ch08.xml
@@ -1696,14 +1696,16 @@ If
 <parameter>change_state</parameter>
 is
 <symbol>True</symbol>,
-and the optional parameter,
-<parameter>state</parameter>,
-is not
-<symbol>NULL</symbol>,
 <function>XkbSetNamedDeviceIndicator</function>
 tells the server to change the state of the named indicator to the value
 specified by
 <parameter>state</parameter>.
+If
+<parameter>change_state</parameter>
+is
+<symbol>False</symbol>,
+<parameter>state</parameter>
+is not used.
 </para>
 
 
-- 
2.7.4



More information about the xorg-devel mailing list