diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2016-11-08 20:35:53 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2016-11-08 20:35:53 +0100 |
commit | 00a06b971531031103c25d650e2078c801afbe39 (patch) | |
tree | 68b30731b60ea281d483905eb0358c2113cbb029 | |
parent | 6c635d62d41477e92f0b30b0f525c7838e64a07d (diff) | |
download | busybox-w32-00a06b971531031103c25d650e2078c801afbe39.tar.gz busybox-w32-00a06b971531031103c25d650e2078c801afbe39.tar.bz2 busybox-w32-00a06b971531031103c25d650e2078c801afbe39.zip |
hush: renumber PIPE_foo, make PIPE_SEQ = 0
PIPE_SEQ is used most often, having it zero makes code smaller:
function old new delta
done_word 719 707 -12
parse_stream 2546 2531 -15
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | shell/hush.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/shell/hush.c b/shell/hush.c index 5a36a7692..57252a17a 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -588,10 +588,10 @@ struct pipe { | |||
588 | IF_HAS_KEYWORDS(smallint res_word;) /* needed for if, for, while, until... */ | 588 | IF_HAS_KEYWORDS(smallint res_word;) /* needed for if, for, while, until... */ |
589 | }; | 589 | }; |
590 | typedef enum pipe_style { | 590 | typedef enum pipe_style { |
591 | PIPE_SEQ = 1, | 591 | PIPE_SEQ = 0, |
592 | PIPE_AND = 2, | 592 | PIPE_AND = 1, |
593 | PIPE_OR = 3, | 593 | PIPE_OR = 2, |
594 | PIPE_BG = 4, | 594 | PIPE_BG = 3, |
595 | } pipe_style; | 595 | } pipe_style; |
596 | /* Is there anything in this pipe at all? */ | 596 | /* Is there anything in this pipe at all? */ |
597 | #define IS_NULL_PIPE(pi) \ | 597 | #define IS_NULL_PIPE(pi) \ |
@@ -3139,7 +3139,6 @@ static struct pipe *new_pipe(void) | |||
3139 | { | 3139 | { |
3140 | struct pipe *pi; | 3140 | struct pipe *pi; |
3141 | pi = xzalloc(sizeof(struct pipe)); | 3141 | pi = xzalloc(sizeof(struct pipe)); |
3142 | /*pi->followup = 0; - deliberately invalid value */ | ||
3143 | /*pi->res_word = RES_NONE; - RES_NONE is 0 anyway */ | 3142 | /*pi->res_word = RES_NONE; - RES_NONE is 0 anyway */ |
3144 | return pi; | 3143 | return pi; |
3145 | } | 3144 | } |