Changeset f71ccc34 in rtems


Ignore:
Timestamp:
02/28/17 08:12:13 (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
267de79a
Parents:
902ffed
git-author:
Sebastian Huber <sebastian.huber@…> (02/28/17 08:12:13)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/28/17 08:31:04)
Message:

termios: Simplify some calculations

Use the modular arithmetic addition rule.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libcsupport/src/termios.c

    r902ffed rf71ccc34  
    15341534      tty->rawInBuf.Head = newHead;
    15351535
    1536       if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
    1537           % tty->rawInBuf.Size)
     1536      if(((tty->rawInBuf.Tail - newHead) % tty->rawInBuf.Size)
    15381537         < tty->lowwater) {
    15391538        tty->flow_ctrl &= ~FL_IREQXOF;
     
    17571756
    17581757      /* if chars_in_buffer > highwater                */
    1759       if ((tty->flow_ctrl & FL_IREQXOF) != 0 && (((newTail - head
    1760           + tty->rawInBuf.Size) % tty->rawInBuf.Size) > tty->highwater)) {
     1758      if ((tty->flow_ctrl & FL_IREQXOF) != 0 && (((newTail - head) %
     1759          tty->rawInBuf.Size) > tty->highwater)) {
    17611760        /* incoming data stream should be stopped */
    17621761        tty->flow_ctrl |= FL_IREQXOF;
Note: See TracChangeset for help on using the changeset viewer.