aboutsummaryrefslogtreecommitdiffstats
path: root/usb-redir.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2011-12-20 18:13:08 +0100
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2012-01-06 15:07:00 +0000
commitbe62a2ebab29eef7dc66c112d60271890ebbbee2 (patch)
tree1002b4c87da2f01304b89a1dc49e20b97cb59254 /usb-redir.c
parentd70d6b31091ab522ce793a52559e3dd9f9913b32 (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>
Diffstat (limited to 'usb-redir.c')
-rw-r--r--usb-redir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usb-redir.c b/usb-redir.c
index a36f2a7cd..2b53cf30c 100644
--- a/usb-redir.c
+++ b/usb-redir.c
@@ -174,7 +174,7 @@ static void usbredir_log(void *priv, int level, const char *msg)
return;
}
- error_report("%s\n", msg);
+ error_report("%s", msg);
}
static void usbredir_log_data(USBRedirDevice *dev, const char *desc,
@@ -193,7 +193,7 @@ static void usbredir_log_data(USBRedirDevice *dev, const char *desc,
for (j = 0; j < 8 && i + j < len; j++) {
n += sprintf(buf + n, " %02X", data[i + j]);
}
- error_report("%s\n", buf);
+ error_report("%s", buf);
}
}