Bug 9828

Summary: manpage of XGetCommand is wrong about return values
Product: xorg Reporter: Brice Goglin <brice.goglin>
Component: Lib/XlibAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: git   
Hardware: Other   
OS: All   
URL: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=133348
Whiteboard:
i915 platform: i915 features:

Description Brice Goglin 2007-01-31 16:01:59 UTC
Bug reported in the Debian BTS a couple years ago.

The manpage of XGetCommand states:
"If sufficient memory can be allocated to contain the string list, XGetCommand fills in the argv_return and argc_return arguments and returns a nonzero status.  Otherwise, it returns a zero status."

Looking at the code, this looks wrong. The function also returns 0 when another error occurs, no only in case of memory allocation failure. The manpage should say something like:
"If no error occurs and sufficient memory can be allocated to contain the string list, ..."

Thank you
Comment 1 Daniel Stone 2007-02-27 01:36:05 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 2 Brice Goglin 2007-07-26 14:51:06 UTC
Fixed in 6f0764d4b56f64786b4980839ca262f10a51af6f

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.