Changeset 4c2a775 in code for icb.c


Ignore:
Timestamp:
Jan 18, 2015, 8:46:13 PM (10 years ago)
Author:
Mike Belopuhov <mike@…>
Branches:
master
Children:
d27dc1e
Parents:
cb7c494
git-author:
Mike Belopuhov <mike@…> (01/18/15 16:58:53)
git-committer:
Mike Belopuhov <mike@…> (01/18/15 20:46:13)
Message:

Do comparison before decrementing one of the operands.
Move invariant out of the conditional block.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icb.c

    rcb7c494 r4c2a775  
    600600        if (*buf && **buf == ICB_M_SEP) {
    601601                **buf = '\0';
    602                 end = *buf;
    603602                (*buf)++;
    604         } else
    605                 end = *buf;
    606         while (notrspace && end && *(--end) == ' ' && end > start)
     603        }
     604        end = *buf;
     605        while (notrspace && end && end > start && *(--end) == ' ')
    607606                *end = '\0';
    608607        return (start);
Note: See TracChangeset for help on using the changeset viewer.