| commit | be62a2ebab29eef7dc66c112d60271890ebbbee2 | [log] [tgz] |
|---|---|---|
| author | Markus Armbruster <armbru@redhat.com> | Tue Dec 20 18:13:08 2011 +0100 |
| committer | Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> | Fri Jan 06 15:07:00 2012 +0000 |
| tree | 1002b4c87da2f01304b89a1dc49e20b97cb59254 | |
| parent | d70d6b31091ab522ce793a52559e3dd9f9913b32 [diff] |
Strip trailing '\n' from error_report()'s first argument (again)
Commit 6daf194d got rid of them, but Hans and Gerd added some more
lately. Tracked down with this Coccinelle semantic patch:
@r@
expression fmt;
position p;
@@
error_report(fmt, ...)@p
@script:python@
fmt << r.fmt;
p << r.p;
@@
if "\\n" in str(fmt):
print "%s:%s:%s:%s" % (p[0].file, p[0].line, p[0].column, fmt)
Signed-off-by: Markus Armbruster <armbru@redhat.com>