src/line_proto.c
changeset 41 40f7aa051acb
parent 33 e5139b339b18
child 45 71e65564afd2
equal deleted inserted replaced
40:51678c7eae03 41:40f7aa051acb
   212     // adjust offset to beyond previous data (as will be moved next)
   212     // adjust offset to beyond previous data (as will be moved next)
   213     recv_offset = lp->tail_len;
   213     recv_offset = lp->tail_len;
   214 
   214 
   215     // move trailing data from previous line to front of buffer
   215     // move trailing data from previous line to front of buffer
   216     if (lp->tail_offset) {
   216     if (lp->tail_offset) {
   217         // move to front
   217         // move to front, no-op if tail_len is zero
   218         memmove(lp->in_buf, lp->in_buf + lp->tail_offset, lp->tail_len);
   218         memmove(lp->in_buf, lp->in_buf + lp->tail_offset, lp->tail_len);
   219 
   219 
   220         // reset
   220         // reset
   221         lp->tail_offset = 0;
   221         lp->tail_offset = 0;
   222         lp->tail_len = 0;
   222         lp->tail_len = 0;