Bug 9828 - manpage of XGetCommand is wrong about return values
Summary: manpage of XGetCommand is wrong about return values
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xlib (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL: http://bugs.debian.org/cgi-bin/bugrep...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-31 16:01 UTC by Brice Goglin
Modified: 2007-07-26 14:51 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.