Blob Blame History Raw
From 910a705253fc87dcd8fe0f1657a2466e14ccb5df Mon Sep 17 00:00:00 2001
Message-Id: <910a705253fc87dcd8fe0f1657a2466e14ccb5df.1382534060.git.jdenemar@redhat.com>
From: Peter Krempa <pkrempa@redhat.com>
Date: Thu, 10 Oct 2013 13:56:33 +0200
Subject: [PATCH] qemu: process: Silence coverity warning when rewinding log
 file

https://bugzilla.redhat.com/show_bug.cgi?id=1001738

The change in ef29de14c37d14abc546e90555a0093797facfdd that introduced
better error logging from qemu introduced a warning from coverity about
unused return value from lseek. Silence this warning and fix typo in the
corresponding error message.

Reported by: John Ferlan

(cherry picked from commit 59e21e973fdbfc9065ff5aa421ae36dbd1c4073a)

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
 src/qemu/qemu_process.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index c991d04..f979877 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -1818,10 +1818,10 @@ cleanup:
         }
 
         len = strlen(buf);
-        /* best effor seek - we need to reset to the original position, so that
+        /* best effort seek - we need to reset to the original position, so that
          * a possible read of the fd in the monitor code doesn't influence this
          * error delivery option */
-        lseek(logfd, pos, SEEK_SET);
+        ignore_value(lseek(logfd, pos, SEEK_SET));
         qemuProcessReadLog(logfd, buf + len, buf_size - len - 1, 0, true);
         virReportError(VIR_ERR_INTERNAL_ERROR,
                        _("process exited while connecting to monitor: %s"),
-- 
1.8.4