Received: from [140.186.70.92] (port=40725 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PCzeF-0000As-FF for qemu-devel@nongnu.org; Mon, 01 Nov 2010 15:02:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PCzeE-0008OU-53 for qemu-devel@nongnu.org; Mon, 01 Nov 2010 15:02:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21949) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PCzeD-0008OO-U0 for qemu-devel@nongnu.org; Mon, 01 Nov 2010 15:02:26 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oA1J2NDs005769 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 1 Nov 2010 15:02:24 -0400 Received: from red-feather.bos.redhat.com (dhcp-100-18-67.bos.redhat.com [10.16.18.67]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id oA1J2NUx025098 for ; Mon, 1 Nov 2010 15:02:23 -0400 From: Jes.Sorensen@redhat.com Date: Mon, 1 Nov 2010 20:02:23 +0100 Message-Id: <1288638143-15227-1-git-send-email-Jes.Sorensen@redhat.com> Subject: [Qemu-devel] [PATCH 1/1] Fold send_all() wrapper unix_write() into one function List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org From: Jes Sorensen The current send_all() wrapper for POSIX calls does nothing but call unix_write(). Merge them to simplify the code. Signed-off-by: Jes Sorensen --- qemu-char.c | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 6d2dce7..88997f9 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -508,9 +508,10 @@ int send_all(int fd, const void *buf, int len1) #else -static int unix_write(int fd, const uint8_t *buf, int len1) +int send_all(int fd, const void *_buf, int len1) { int ret, len; + const uint8_t *buf = _buf; len = len1; while (len > 0) { @@ -527,11 +528,6 @@ static int unix_write(int fd, const uint8_t *buf, int len1) } return len1 - len; } - -int send_all(int fd, const void *buf, int len1) -{ - return unix_write(fd, buf, len1); -} #endif /* !_WIN32 */ #ifndef _WIN32 -- 1.7.2.3