[PATCH 1/4] xkb: Remove superfluous if(p) checks around free(p)

Mikhail Gusarov dottedmag at dottedmag.net
Fri Jun 4 08:23:25 PDT 2010


Twas brillig at 11:10:46 04.06.2010 UTC-04 when mattst88 at gmail.com did gyre and gimble:

 >> Signed-off-by: Mikhail Gusarov <dottedmag at dottedmag.net>
 >> ---
 >>  xkb/xkbUtils.c |  144 +++++++++++++++++++-------------------------------------
 >>  1 files changed, 48 insertions(+), 96 deletions(-)

[skip]

 MT> I thought about doing this, but wondered if there would be any
 MT> performance degradation by always calling the free function. Any
 MT> idea?

I doubt device initialization is the part of tight loop :) So dozen of
free()s is not harmful, given it's just a function calls which return
immediately.

-- 
  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/20100604/c270a326/attachment.pgp>


More information about the xorg-devel mailing list