* \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)
*/
{
int n;
- if (!size)
- return -E_RECV;
+ assert(size);
n = recv_bin_buffer(fd, buf, size - 1);
if (n >= 0)
buf[n] = '\0';