trivial: remove trailing newline from error_report
PATCH v2 1/1 trivial: remove trailing newline from error_report
Minor cleanup.
--- hw/ide/ahci.c | 2 +- hw/vfio/platform.c | 2 +- net/tap-linux.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
hw/ide/ahci.c +1 -1
@@ -885,7 +885,7 @@ static int ahci_populate_sglist(AHCIDevice *ad, QEMUSGList *sglist, prdt_tbl_entry_size(&tbl[i]));if (sglist->size >INT32_MAX ) {error_report ("AHCI Physical Region Descriptor Table describes " -"more than 2 GiB.\n" ); +"more than 2 GiB." );qemu_sglist_destroy (sglist); r =-1 ; goto out;
hw/vfio/platform.c +1 -1
@@ -225,7 +225,7 @@ static void vfio_intp_interrupt(VFIOINTp *intp) ret =event_notifier_test_and_clear (&intp->interrupt);if (!ret) { -error_report ("Error when clearing fd=%d (ret = %d)\n" , +error_report ("Error when clearing fd=%d (ret = %d)" ,event_notifier_get_fd (&intp->interrupt), ret); }
net/tap-linux.c +2 -2
@@ -211,7 +211,7 @@ int tap_fd_set_vnet_le(int fd, int is_le)return -errno; } -error_report ("TUNSETVNETLE ioctl() failed: %s.\n" ,strerror (errno)); +error_report ("TUNSETVNETLE ioctl() failed: %s." ,strerror (errno));abort (); }
@@ -228,7 +228,7 @@ int tap_fd_set_vnet_be(int fd, int is_be)return -errno; } -error_report ("TUNSETVNETBE ioctl() failed: %s.\n" ,strerror (errno)); +error_report ("TUNSETVNETBE ioctl() failed: %s." ,strerror (errno));abort (); }
Signature · 1 line
2.1.0
Quoted 8 lines · John Snow
Minor cleanup.
Signed-off-by John Snow <[email protected]>--- hw/ide/ahci.c | 2 +- hw/vfio/platform.c | 2 +- net/tap-linux.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
Quoted 8 lines · John Snow
Minor cleanup.
Signed-off-by John Snow <[email protected]>--- hw/ide/ahci.c | 2 +- hw/vfio/platform.c | 2 +- net/tap-linux.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
Laszlo Ersek suggested a compile-time check (e.g. BUILD_BUG_ON()). Have you looked into this?
Perhaps something along the lines of:
BUILD_BUG_ON(__builtin_constant_p(fmt) &&
__builtin_strlen(fmt) > 0 && fmt[__builtin_strlen(fmt) - 1] == '\n')
Quoted 9 lines · Stefan Hajnoczi
Quoted 5 lines · John Snow
Minor cleanup.
Signed-off-by John Snow <[email protected]> --- hw/ide/ahci.c| 2 +-
hw/vfio/platform.c| 2 +-net/tap-linux.c| 4 ++-- 3
files changed, 4 insertions(+), 4 deletions(-)Reviewed-by Stefan Hajnoczi <[email protected]>
Quoted 8 lines
Laszlo Ersek suggested a compile-time check (e.g.
BUILD_BUG_ON()). Have you looked into this?Perhaps something along the lines of:
BUILD_BUG_ON(__builtin_constant_p(fmt) && __builtin_strlen(fmt) > 0 && fmt[__builtin_strlen(fmt) - 1] == '\n')
ping for 2.5; I don't think this ever made it in.
Quoted 15 lines · John Snow
Quoted 12 lines · Stefan Hajnoczi
Quoted 5 lines · John Snow
Minor cleanup.
Signed-off-by John Snow <[email protected]> --- hw/ide/ahci.c| 2 +-
hw/vfio/platform.c| 2 +-net/tap-linux.c| 4 ++-- 3
files changed, 4 insertions(+), 4 deletions(-)Reviewed-by Stefan Hajnoczi <[email protected]>Laszlo Ersek suggested a compile-time check (e.g.
BUILD_BUG_ON()). Have you looked into this?
Quoted 7 lines
Quoted 5 lines
Perhaps something along the lines of:
BUILD_BUG_ON(__builtin_constant_p(fmt) && __builtin_strlen(fmt) > 0 && fmt[__builtin_strlen(fmt) - 1] == '\n')ping for 2.5; I don't think this ever made it in.
CCing Michael explicitly since this is for the trivial tree
Quoted 1 line · John Snow
Minor cleanup.
Finally applied to -trivial. Thank you!
/mjt