- nleft = cc;
- offset = buf;
- for (qp = ioq->queue.q_forw; qp != &ioq->queue; qp = qp->q_forw) {
- io = (struct io *) qp;
- if ((nbytes = io->nbytes - io->offset) < 0) {
- fprintf(stderr, "ioqtobuf: offset %d nbytes %d\n",
- io->offset, io->nbytes);
- continue;
- }
- if (nbytes > 0) {
- if (nleft < nbytes)
- nbytes = nleft;
- bcopy(io->data + io->offset, offset, nbytes);
- offset += nbytes;
- nleft -= nbytes;
- }
+ nleft = cc;
+ offset = buf;
+ for (qp = ioq->queue.q_forw; qp != &ioq->queue; qp = qp->q_forw) {
+ io = (struct io *)qp;
+ if ((nbytes = io->nbytes - io->offset) < 0) {
+ fprintf(stderr, "ioqtobuf: offset %d nbytes %d\n",
+ io->offset, io->nbytes);
+ continue;