From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54480) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqhd7-0001ui-60 for qemu-devel@nongnu.org; Thu, 14 Apr 2016 09:48:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aqhd6-0003PN-6g for qemu-devel@nongnu.org; Thu, 14 Apr 2016 09:48:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37098) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqhd5-0003PI-WF for qemu-devel@nongnu.org; Thu, 14 Apr 2016 09:48:20 -0400 Date: Thu, 14 Apr 2016 16:48:14 +0300 From: "Michael S. Tsirkin" Message-ID: <1460641658-18561-6-git-send-email-mst@redhat.com> References: <1460641658-18561-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1460641658-18561-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PULL 5/6] tpm: Fix write to file descriptor function List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Stefan Berger , Stefan Berger , "Daniel P. Berrange" , Michael Tokarev , Eric Blake From: Stefan Berger Fix a bug introduced in commit 46f296c while moving send_all to the tpm_passthrough code. Fix the name of the variable used in the loop. Signed-off-by: Stefan Berger Acked-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/tpm/tpm_passthrough.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/tpm/tpm_passthrough.c b/hw/tpm/tpm_passthrough.c index e98efb7..e88c0d2 100644 --- a/hw/tpm/tpm_passthrough.c +++ b/hw/tpm/tpm_passthrough.c @@ -86,7 +86,7 @@ static int tpm_passthrough_unix_write(int fd, const uint8_t *buf, uint32_t len) int ret, remain; remain = len; - while (len > 0) { + while (remain > 0) { ret = write(fd, buf, remain); if (ret < 0) { if (errno != EINTR && errno != EAGAIN) { -- MST