aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/scripting-engines/trace-event-perl.c
diff options
context:
space:
mode:
authorDan Carpenter <[email protected]>2014-12-02 11:59:50 +0300
committerJonathan Corbet <[email protected]>2014-12-02 08:55:32 -0500
commitea04036032edda6f771c1381d03832d2ed0f6c31 (patch)
tree3266fb1cff71f9e52440d2710b5f6b03a8f3b8d7 /tools/perf/util/scripting-engines/trace-event-perl.c
parent86d3e023e05d90b2b5f88dcbf2e334b5835131f8 (diff)
CodingStyle: add some more error handling guidelines
I added a paragraph on choosing label names, and updated the example code to use a better label name. I also cleaned up the example code to more modern style by moving the allocation out of the initializer and changing the NULL check. Perhaps the most common type of error handling bug in the kernel is "one err bugs". CodingStyle already says that we should "avoid nesting" by using error labels and one err style error handling tends to have multiple indent levels, so this was already bad style. But I've added a new paragraph explaining how to avoid one err bugs by using multiple error labels which is, hopefully, more clear. Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Julia Lawall <[email protected]> [jc: added GFP_KERNEL to kmalloc() call] Signed-off-by: Jonathan Corbet <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-perl.c')
0 files changed, 0 insertions, 0 deletions