]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - net.c
Get rid of E_RECV.
[paraslash.git] / net.c
diff --git a/net.c b/net.c
index c7bb8b4b71293ee89964b55175c2170fb10c3e31..2991b6db5c42b58c0028c371890739323662bba7 100644 (file)
--- a/net.c
+++ b/net.c
@@ -203,12 +203,10 @@ __printf_2_3 int send_va_buffer(int fd, const char *fmt, ...)
  * \param buf the buffer to write the decrypted data to
  * \param size the size of \a buf
  *
- * Receive at most \a size bytes from filedescriptor fd. If encryption is
+ * Receive at most \a size bytes from file descriptor \a fd. If encryption is
  * available, decrypt the received buffer.
  *
- * \return The number of bytes received on success. On receive errors, -E_RECV
- * is returned. On crypt errors, the corresponding crypt error number is
- * returned.
+ * \return The number of bytes received on success, negative on errors.
  *
  * \sa recv(2)
  */
@@ -254,8 +252,7 @@ int recv_buffer(int fd, char *buf, size_t size)
 {
        int n;
 
-       if (!size)
-               return -E_RECV;
+       assert(size);
        n = recv_bin_buffer(fd, buf, size - 1);
        if (n >= 0)
                buf[n] = '\0';