OSDN Git Service

oslib: strip trailing '\n' from error_setg() string argument
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Tue, 16 May 2017 00:11:49 +0000 (21:11 -0300)
committerStefan Hajnoczi <stefanha@redhat.com>
Wed, 7 Jun 2017 13:38:44 +0000 (14:38 +0100)
spotted by Coccinelle script scripts/coccinelle/err-bad-newline.cocci

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
util/oslib-posix.c

index 7e28c16..9ab2eb2 100644 (file)
@@ -400,7 +400,7 @@ void os_mem_prealloc(int fd, char *area, size_t memory, int smp_cpus,
     /* touch pages simultaneously */
     if (touch_all_pages(area, hpagesize, numpages, smp_cpus)) {
         error_setg(errp, "os_mem_prealloc: Insufficient free host memory "
-            "pages available to allocate guest RAM\n");
+            "pages available to allocate guest RAM");
     }
 
     ret = sigaction(SIGBUS, &oldact, NULL);