]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: process: Silence coverity warning when rewinding log file
authorPeter Krempa <pkrempa@redhat.com>
Mon, 30 Sep 2013 09:47:47 +0000 (11:47 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 30 Sep 2013 11:43:32 +0000 (13:43 +0200)
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

src/qemu/qemu_process.c

index d7be7319c3612c6b16ca1e8f09fd781b769dfd82..7a30a5ed4e40f70e495895663ee16b0f8e597519 100644 (file)
@@ -1845,10 +1845,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"),