Skip to content
Commit be62a2eb authored by Markus Armbruster's avatar Markus Armbruster Committed by Stefan Hajnoczi
Browse files

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: default avatarMarkus Armbruster <armbru@redhat.com>
parent d70d6b31
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment