diff options
| author | Mauro Carvalho Chehab <[email protected]> | 2011-03-25 11:45:29 -0300 |
|---|---|---|
| committer | Mauro Carvalho Chehab <[email protected]> | 2011-05-20 07:26:26 -0300 |
| commit | 58d5eaec9f877a9bcfa9b6dca0ea51850975c49f (patch) | |
| tree | 6c061a242bd99df311ee36a19d1cec10e073d316 /tools/perf/scripts/python/bin | |
| parent | 7fc7356f4eafa953197e1c4e2d236e199a51db28 (diff) | |
[media] drxd: Don't use a macro for CHK_ERROR with a break inside
The macro is defined as:
#define CHK_ERROR(s) if( (status = s)<0 ) break
This sucks, as makes harder to debug if something got wrong and
there are more than one level of loops. Also, violates CodingStyle.
Fixed by this simple perl script:
while (<>) { $f.=$_; };
$f=~ s,\n\#define CHK_ERROR[^\n]+\n,\n,;
$f=~ s=(CHK_ERROR\(.*\,)\n\s+=\1 =g;
$f=~ s=(CHK_ERROR\(.*\,)\n\s+=\1 =g;
$f=~ s=(CHK_ERROR\(.*\,)\n\s+=\1 =g;
$f=~ s=(CHK_ERROR\(.*)\s+(\,)\n\s+=\1\2 =g;
$f=~ s=(CHK_ERROR\(.*)\s+(\,)\n\s+=\1\2 =g;
$f=~ s=(CHK_ERROR\(.*)\s+(\,)\n\s+=\1\2 =g;
$f=~ s,\n(\t+)CHK_ERROR\((.*)\)\;,\n\1status = \2;\n\1if (status < 0)\n\1\tbreak;,g;
print $f;
Plus a few manual adjustments
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions