mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
error: Clean up errors with embedded newlines (again)
The arguments of error_report() should yield a short error string without newlines. A few places try to print additional help after the error message by embedding newlines in the error string. That's nice, but let's do it the right way. Commit474c213
cleaned up some, but they keep coming back. Offenders tracked down with the Coccinelle semantic patch from commit312fd5f
. Cc: Laszlo Ersek <lersek@redhat.com> Cc: Pavel Fedin <p.fedin@samsung.com> Signed-off-by: Markus Armbruster <armbru@pond.sub.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
bf89e87427
commit
433672b0d5
3 changed files with 7 additions and 8 deletions
|
@ -599,9 +599,8 @@ int main(int argc, char **argv)
|
|||
}
|
||||
|
||||
if ((argc - optind) != 1) {
|
||||
error_report("Invalid number of argument.\n"
|
||||
"Try `%s --help' for more information.",
|
||||
argv[0]);
|
||||
error_report("Invalid number of arguments");
|
||||
error_printf("Try `%s --help' for more information.\n", argv[0]);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue