Bug 105191 - Incorrect comment about XRRGetScreenSizeRange return code in Xrandr.h
Summary: Incorrect comment about XRRGetScreenSizeRange return code in Xrandr.h
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/XrandR (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Keith Packard
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-21 13:44 UTC by Peter Åstrand
Modified: 2018-08-10 20:06 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Peter Åstrand 2018-02-21 13:44:38 UTC
In Xrandr.h, there's a comment:

/* despite returning a Status, this returns 1 for success */
Status
XRRGetScreenSizeRange (Display *dpy, Window window,
		       int *minWidth, int *minHeight,
		       int *maxWidth, int *maxHeight);

This comment was added in:

commit 5e94f071f45ca504ccafe083e2e289351ba6eab4

    GetScreenSizeRange: Document funky return code in the header

However, the return code is not funky at all - "1 for sucess" is the normal Status code approach. For example, see https://www.x.org/releases/X11R7.6/doc/libX11/specs/libX11/libX11.html:

"Some functions return Status, an integer error indication. If the function fails, it returns a zero."

IOW, the comment should be removed.
Comment 1 GitLab Migration User 2018-08-10 20:06:20 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/lib/libxrandr/issues/7.


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.