[PATCH 1/2] Ensure all resource types created have names registered
Keith Packard
keithp at keithp.com
Thu Dec 10 23:49:55 PST 2009
On Thu, 10 Dec 2009 23:28:50 -0800, Alan Coopersmith <Alan.Coopersmith at Sun.COM> wrote:
> I'm not understanding - the first hunk removes the original place it
> was set, the second hunk adds a new setting.
Right, just reading patches too quickly.
> RegisterResourceName already strips TypeMask - the move of the | XRC_DRAWABLE
> is so that the check to see if CreateNewResourceType returned 0 isn't
> defeated by setting the XRC_DRAWABLE bit before we've checked it for 0.
> It's just a common bug I happened to notice while making this change.
Cool. I missed it too. Might have been more clear if the code
consistently did:
foo = CreateNewResourceType();
if (!foo)
failure;
foo |= ResourceClass;
What I wouldn't like is:
foo = CreateNewResourceType() | ResourceClass;
if (foo == ResourceClass)
failure;
> I can work on that.
Thanks. git add -p ftw.
> [BTW, patch 2/2 was sent, but at 45kb got caught in the moderation queue.
> Should we raise the limit to be > 40kb, or leave it as a hint to break
> patches into smaller chunks when possible?]
I've just raised it; sometimes reasonable patches will be larger than this.
--
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.x.org/archives/xorg-devel/attachments/20091210/e4d6431e/attachment.pgp
More information about the xorg-devel
mailing list