qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/1] Fold send_all() wrapper unix_write() into o


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 1/1] Fold send_all() wrapper unix_write() into one function
Date: Wed, 03 Nov 2010 13:27:58 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Lightning/1.0b1 Thunderbird/3.0.10

On 11/01/2010 02:02 PM, address@hidden wrote:
From: Jes Sorensen<address@hidden>

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<address@hidden>

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]