From: Mauro Carvalho Chehab Date: Fri, 25 Mar 2011 14:45:29 +0000 (-0300) Subject: [media] drxd: Don't use a macro for CHK_ERROR with a break inside X-Git-Tag: v3.0-rc1~322^2~224 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58d5eaec9f877a9bcfa9b6dca0ea51850975c49f;p=pandora-kernel.git [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 --- Reading git-diff-tree failed