summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2011-07-03 18:12:26 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-07-27 17:55:44 -0300
commit469ffe08366589f3096247590b16f712b20c51c3 (patch)
treec75fb74080f0a42d691e7dd1d12a8715938d59a2 /tools/perf/scripts/python
parentea90f011fdcc3d4fde78532eab8af09637176765 (diff)
[media] tda18271c2dd: Remove the CHK_ERROR macro
The CHK_ERROR macro does a flow control, violating chapter 12 of the Documentation/CodingStyle. Doing flow controls inside macros is a bad idea, as it hides what's happening. It also hides the var "status" with is also a bad idea. The changes were done by this small perl script: my $blk=0; while (<>) { s/^\s+// if ($blk); $f =~ s/\s+$// if ($blk && /^\(/); $blk = 1 if (!m/\#/ && m/CHK_ERROR/); $blk=0 if ($blk && m/\;/); s/\n/ / if ($blk); $f.=$_; }; $f=~ s,\n(\t+)CHK_ERROR\((.*)\)\;([^\n]*),\n\1status = \2;\3\n\1if (status < 0)\n\1\tbreak;,g; print $f; And manually fixed. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions