From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=43417 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PDi47-0008SK-Q4 for qemu-devel@nongnu.org; Wed, 03 Nov 2010 14:28:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PDi46-0006Bl-O7 for qemu-devel@nongnu.org; Wed, 03 Nov 2010 14:28:07 -0400 Received: from mail-gy0-f173.google.com ([209.85.160.173]:33650) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PDi46-0006Bc-Ld for qemu-devel@nongnu.org; Wed, 03 Nov 2010 14:28:06 -0400 Received: by gya6 with SMTP id 6so752212gya.4 for ; Wed, 03 Nov 2010 11:28:06 -0700 (PDT) Message-ID: <4CD1A9AE.4050102@codemonkey.ws> Date: Wed, 03 Nov 2010 13:27:58 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 1/1] Fold send_all() wrapper unix_write() into one function References: <1288638143-15227-1-git-send-email-Jes.Sorensen@redhat.com> In-Reply-To: <1288638143-15227-1-git-send-email-Jes.Sorensen@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jes.Sorensen@redhat.com Cc: qemu-devel@nongnu.org On 11/01/2010 02:02 PM, Jes.Sorensen@redhat.com wrote: > 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 > Applied. Thanks. Regards, Anthony Liguori > --- > 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 >