[PATCH trivial] audio/audio.c: remove trailing newline in error_setg

Michael Tokarev posted 1 patch 10 months, 4 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20240103111800.250151-1-mjt@tls.msk.ru
Maintainers: Gerd Hoffmann <kraxel@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Michael Tokarev <mjt@tls.msk.ru>, Laurent Vivier <laurent@vivier.eu>
audio/audio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH trivial] audio/audio.c: remove trailing newline in error_setg
Posted by Michael Tokarev 10 months, 4 weeks ago
error_setg() appends newline to the formatted message.
Fixes: cb94ff5f80c5

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 audio/audio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/audio/audio.c b/audio/audio.c
index 8d1e4ad922..7ac74f9e16 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -1744,7 +1744,7 @@ static AudioState *audio_init(Audiodev *dev, Error **errp)
         if (driver) {
             done = !audio_driver_init(s, driver, dev, errp);
         } else {
-            error_setg(errp, "Unknown audio driver `%s'\n", drvname);
+            error_setg(errp, "Unknown audio driver `%s'", drvname);
         }
         if (!done) {
             goto out;
-- 
2.39.2
Re: [PATCH trivial] audio/audio.c: remove trailing newline in error_setg
Posted by Philippe Mathieu-Daudé 10 months, 4 weeks ago
On 3/1/24 12:18, Michael Tokarev wrote:
> error_setg() appends newline to the formatted message.
> Fixes: cb94ff5f80c5
> 
> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
> ---
>   audio/audio.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/audio/audio.c b/audio/audio.c
> index 8d1e4ad922..7ac74f9e16 100644
> --- a/audio/audio.c
> +++ b/audio/audio.c
> @@ -1744,7 +1744,7 @@ static AudioState *audio_init(Audiodev *dev, Error **errp)
>           if (driver) {
>               done = !audio_driver_init(s, driver, dev, errp);
>           } else {
> -            error_setg(errp, "Unknown audio driver `%s'\n", drvname);
> +            error_setg(errp, "Unknown audio driver `%s'", drvname);
>           }
>           if (!done) {
>               goto out;

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>