RFC: getting rid of Xalloc/Xfree/... in server

Mikhail Gusarov dottedmag at dottedmag.net
Sun May 9 23:51:35 PDT 2010


Twas brillig at 08:58:07 10.05.2010 UTC+10 when peter.hutterer at who-t.net did gyre and gimble:

 PH> Please send patches to the list, it'd make it a lot easier to
 PH> review than having to copy from the repo.

[/me notes: X server patches to list, libraries usually reviewed by Alan
- as pull request] Actually the sheer size of rename patch was what held
me from doing it in first place.

 PH> Also, I noticed your Signed-off-by: is missing from the commits.

Fixed.

 PH> commit 181bc54d4508bef43f409ff47c033d13e56b964a
 PH>     Clean {X,XNF}{alloc,calloc,realloc,free,strdup} from pre-C89 baggage

 PH> Xstrdup has a Warning comment, XNFstrdup has the same comment but
 PH> without the "Warning:". Might be good to fix that up for
 PH> consistency.

There are comments added to header in the later patch, so I decided to
remove both from .c. Anyway it's the documentation about what functions
do, not how they are implemented.

 PH> It might be worth adding some simple test cases to the test/
 PH> directory to make sure these ones don't break and do what they're
 PH> supposed to. I realize that given what they do, that seems a bit
 PH> over the top, so it's your call.

Yeah, those are _too_ simple, and description was extracted from
existing implementation, not from careful review of callers.

 PH> Change the declaration for Xrealloc for consistency.

Uhm, what exactly do you mean? I don't see any inconsistency.

 PH> commit 3be78ed5cbca780815cba753f47f2c4744a4edea:
 PH>     Document allocation functions, noting deviations from C library

 PH> just some comment typos: "terminating the server...", "... difference from the
 PH> library function is..."

Thanks.

 PH> Other than that:
 PH> Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>

 PH> Though I have to admit that my brain gave up halfway through the
 PH> replacement patch.

This one was generated by sed, so you did not miss much :)

-- 
  http://fossarchy.blogspot.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100510/17458074/attachment.pgp>


More information about the xorg-devel mailing list