diff options
author | rsc <rsc> | 2006-07-16 01:52:22 +0000 |
---|---|---|
committer | rsc <rsc> | 2006-07-16 01:52:22 +0000 |
commit | 6f2b626d2882c2b9df5039b324c4167be3d74f28 (patch) | |
tree | 433d5df5590b4f2f4b744e3ed2da95a771c1bfe0 /console.c | |
parent | 51716a869c2e596b43dcc9d030a6626b29cf4829 (diff) | |
download | xv6-labs-6f2b626d2882c2b9df5039b324c4167be3d74f28.tar.gz xv6-labs-6f2b626d2882c2b9df5039b324c4167be3d74f28.tar.bz2 xv6-labs-6f2b626d2882c2b9df5039b324c4167be3d74f28.zip |
remove non-idiomatic increment/decrement
Diffstat (limited to 'console.c')
-rw-r--r-- | console.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -53,7 +53,7 @@ real_cons_putc(int c) } else { c |= 0x0700; // black on white crt[ind] = c; - ind += 1; + ind++; } if((ind / 80) >= 24){ @@ -100,10 +100,8 @@ printint(int xx, int base, int sgn) if(neg) buf[i++] = '-'; - while(i > 0){ - i -= 1; + while(--i >= 0) real_cons_putc(buf[i]); - } } /* |