]> git.baikalelectronics.ru Git - kernel.git/commit
perf tools: Optimize parse_subsystem_tracepoint_event()
authorUlrich Drepper <drepper@redhat.com>
Sun, 6 Dec 2009 18:25:30 +0000 (13:25 -0500)
committerIngo Molnar <mingo@elte.hu>
Mon, 7 Dec 2009 07:09:29 +0000 (08:09 +0100)
commitbb2613757f583dfdd2060cd3dbc7fe6914df54eb
tree1251ef18261812270c2080dc72ba4a4229917a90
parent132984e129840d12cfb61639b44413ab52f032f9
perf tools: Optimize parse_subsystem_tracepoint_event()

Uses of strcat are almost always signs that someone is too lazy
to think about the code a bit more carefully.  One always has to
know about the lengths of the strings involved to avoid buffer
overflows.

This is one case where the size of the object code for me is
reduced by 38 bytes.  The code should also be faster, especially
if flags is non-NULL.

Signed-off-by: Ulrich Drepper <drepper@redhat.com>
Cc: a.p.zijlstra@chello.nl
Cc: fweisbec@gmail.com
Cc: jaswinderrajput@gmail.com
Cc: paulus@samba.org
LKML-Reference: <200912061825.nB6IPUa1023306@hs20-bc2-1.build.redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
tools/perf/util/parse-events.c