net.c: Rename sendall() to write_all().
[paraslash.git] / net.c
diff --git a/net.c b/net.c
index 601396477c66715e21bc222d69c0d7e0b1aa9f92..427ab0f0d2a3ebe3873eeff603422742b66a94b1 100644 (file)
--- a/net.c
+++ b/net.c
@@ -346,16 +346,16 @@ struct in_addr extract_v4_addr(const struct sockaddr_storage *ss)
 }
 
 /*
- * Send out a buffer, resend on short writes.
+ * Write a buffer to a file descriptor, re-write on short writes.
  *
  * \param fd The file descriptor.
  * \param buf The buffer to be sent.
  * \param len The length of \a buf.
  *
- * \return Standard. In any case, the number of bytes actually sent is stored
- * in \a len.
+ * \return Standard. In any case, the number of bytes that have been written is
+ * stored in \a len.
  */
-static int sendall(int fd, const char *buf, size_t *len)
+static int write_all(int fd, const char *buf, size_t *len)
 {
        size_t total = *len;
 
@@ -397,10 +397,10 @@ int send_bin_buffer(int fd, const char *buf, size_t len)
                /* RC4 may write more than len to the output buffer */
                unsigned char *outbuf = para_malloc(ROUND_UP(len, 8));
                (*cf)(len, (unsigned char *)buf, outbuf, private);
-               ret = sendall(fd, (char *)outbuf, &len);
+               ret = write_all(fd, (char *)outbuf, &len);
                free(outbuf);
        } else
-               ret = sendall(fd, buf, &len);
+               ret = write_all(fd, buf, &len);
        return ret;
 }