close (fd);
malloc_copyrx2fd (struct rx_call *call, int fd, size_t len){    void *buf;    struct stat statbuf;    u_long bufsize;    u_long nread;    size_t reallen = len;    int ret = 0;    if (fstat (fd, &statbuf)) {	arla_warn (ADEBFBUF, errno, "fstat");	bufsize = 1024;    } else	bufsize = statbuf.st_blksize;    buf = malloc (bufsize);    if (buf == NULL)	return ENOMEM;    while ( len && (nread = rx_Read (call, buf, min(bufsize,						    len))) > 0) {	if (write (fd, buf, nread) != nread) {	    ret = errno;	    break;	}	len -= nread;    }    if (ftruncate (fd, reallen) < 0)	ret = errno;    close (fd);    free (buf);    return ret;}