mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
error: Strip trailing '\n' from error string arguments (again)
Commit6daf194d
andbe62a2eb
got rid of a bunch, but they keep coming back. Tracked down with this Coccinelle semantic patch: @r@ expression err, eno, cls, fmt; position p; @@ ( error_report(fmt, ...)@p | error_set(err, cls, fmt, ...)@p | error_set_errno(err, eno, cls, fmt, ...)@p | error_setg(err, fmt, ...)@p | error_setg_errno(err, eno, 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> Message-id: 1360354939-10994-4-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
1a9522cc6e
commit
312fd5f290
16 changed files with 83 additions and 83 deletions
|
@ -720,7 +720,7 @@ int unix_connect_opts(QemuOpts *opts, Error **errp,
|
|||
int sock, rc;
|
||||
|
||||
if (NULL == path) {
|
||||
error_setg(errp, "unix connect: no path specified\n");
|
||||
error_setg(errp, "unix connect: no path specified");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -854,7 +854,7 @@ SocketAddress *socket_parse(const char *str, Error **errp)
|
|||
addr = g_new(SocketAddress, 1);
|
||||
if (strstart(str, "unix:", NULL)) {
|
||||
if (str[5] == '\0') {
|
||||
error_setg(errp, "invalid Unix socket address\n");
|
||||
error_setg(errp, "invalid Unix socket address");
|
||||
goto fail;
|
||||
} else {
|
||||
addr->kind = SOCKET_ADDRESS_KIND_UNIX;
|
||||
|
@ -863,7 +863,7 @@ SocketAddress *socket_parse(const char *str, Error **errp)
|
|||
}
|
||||
} else if (strstart(str, "fd:", NULL)) {
|
||||
if (str[3] == '\0') {
|
||||
error_setg(errp, "invalid file descriptor address\n");
|
||||
error_setg(errp, "invalid file descriptor address");
|
||||
goto fail;
|
||||
} else {
|
||||
addr->kind = SOCKET_ADDRESS_KIND_FD;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue