diff options
author | Denys Vlasenko | 2019-06-08 12:57:07 +0200 |
---|---|---|
committer | Denys Vlasenko | 2019-06-08 12:57:07 +0200 |
commit | fa182a355a2c389d771f9a66ef8ec40bef094202 (patch) | |
tree | 4e595aa03e5380d589710b84bf6b676b2af98e24 /editors | |
parent | 7a4e55422a3143eee48660a1f620646a88988147 (diff) | |
download | busybox-fa182a355a2c389d771f9a66ef8ec40bef094202.zip busybox-fa182a355a2c389d771f9a66ef8ec40bef094202.tar.gz |
vi: code shrink
function old new delta
colon 2852 2846 -6
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'editors')
-rw-r--r-- | editors/vi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editors/vi.c b/editors/vi.c index 8af1ef7..0ea547a 100644 --- a/editors/vi.c +++ b/editors/vi.c @@ -1331,7 +1331,7 @@ static char what_reg(void) char c; c = 'D'; // default to D-reg - if (0 <= YDreg && YDreg <= 25) + if (YDreg <= 25) c = 'a' + (char) YDreg; if (YDreg == 26) c = 'D'; @@ -2550,7 +2550,7 @@ static void colon(char *buf) free(reg[Ureg]); // free orig line reg- for 'U' reg[Ureg] = NULL; } - if (YDreg >= 0 && YDreg < 28) { + /*if (YDreg < 28) - always true*/ { free(reg[YDreg]); // free default yank/delete register reg[YDreg] = NULL; } |