diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-03-02 04:07:14 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-03-02 04:07:14 +0100 |
commit | 940c7206c2a4acb386ab47199a6c313c04387f3b (patch) | |
tree | 9fb4aee464611ffd2cc6edbdf862149037e35f60 /shell | |
parent | 708dd4c98662670f3104b71c2fc5eef82bb726a8 (diff) | |
download | busybox-w32-940c7206c2a4acb386ab47199a6c313c04387f3b.tar.gz busybox-w32-940c7206c2a4acb386ab47199a6c313c04387f3b.tar.bz2 busybox-w32-940c7206c2a4acb386ab47199a6c313c04387f3b.zip |
convert "do {...} while (1);" -> "while (1) {...}"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/shell/ash.c b/shell/ash.c index 98d2c7c29..c3c953656 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -3539,12 +3539,12 @@ set_curjob(struct job *jp, unsigned mode) | |||
3539 | 3539 | ||
3540 | /* first remove from list */ | 3540 | /* first remove from list */ |
3541 | jpp = curp = &curjob; | 3541 | jpp = curp = &curjob; |
3542 | do { | 3542 | while (1) { |
3543 | jp1 = *jpp; | 3543 | jp1 = *jpp; |
3544 | if (jp1 == jp) | 3544 | if (jp1 == jp) |
3545 | break; | 3545 | break; |
3546 | jpp = &jp1->prev_job; | 3546 | jpp = &jp1->prev_job; |
3547 | } while (1); | 3547 | } |
3548 | *jpp = jp1->prev_job; | 3548 | *jpp = jp1->prev_job; |
3549 | 3549 | ||
3550 | /* Then re-insert in correct position */ | 3550 | /* Then re-insert in correct position */ |
@@ -3560,14 +3560,14 @@ set_curjob(struct job *jp, unsigned mode) | |||
3560 | case CUR_RUNNING: | 3560 | case CUR_RUNNING: |
3561 | /* newly created job or backgrounded job, | 3561 | /* newly created job or backgrounded job, |
3562 | put after all stopped jobs. */ | 3562 | put after all stopped jobs. */ |
3563 | do { | 3563 | while (1) { |
3564 | jp1 = *jpp; | 3564 | jp1 = *jpp; |
3565 | #if JOBS | 3565 | #if JOBS |
3566 | if (!jp1 || jp1->state != JOBSTOPPED) | 3566 | if (!jp1 || jp1->state != JOBSTOPPED) |
3567 | #endif | 3567 | #endif |
3568 | break; | 3568 | break; |
3569 | jpp = &jp1->prev_job; | 3569 | jpp = &jp1->prev_job; |
3570 | } while (1); | 3570 | } |
3571 | /* FALLTHROUGH */ | 3571 | /* FALLTHROUGH */ |
3572 | #if JOBS | 3572 | #if JOBS |
3573 | case CUR_STOPPED: | 3573 | case CUR_STOPPED: |
@@ -3740,7 +3740,7 @@ setjobctl(int on) | |||
3740 | goto out; | 3740 | goto out; |
3741 | /* fd is a tty at this point */ | 3741 | /* fd is a tty at this point */ |
3742 | close_on_exec_on(fd); | 3742 | close_on_exec_on(fd); |
3743 | do { /* while we are in the background */ | 3743 | while (1) { /* while we are in the background */ |
3744 | pgrp = tcgetpgrp(fd); | 3744 | pgrp = tcgetpgrp(fd); |
3745 | if (pgrp < 0) { | 3745 | if (pgrp < 0) { |
3746 | out: | 3746 | out: |
@@ -3751,7 +3751,7 @@ setjobctl(int on) | |||
3751 | if (pgrp == getpgrp()) | 3751 | if (pgrp == getpgrp()) |
3752 | break; | 3752 | break; |
3753 | killpg(0, SIGTTIN); | 3753 | killpg(0, SIGTTIN); |
3754 | } while (1); | 3754 | } |
3755 | initialpgrp = pgrp; | 3755 | initialpgrp = pgrp; |
3756 | 3756 | ||
3757 | setsignal(SIGTSTP); | 3757 | setsignal(SIGTSTP); |
@@ -5970,7 +5970,7 @@ expari(int quotes) | |||
5970 | p = expdest - 1; | 5970 | p = expdest - 1; |
5971 | *p = '\0'; | 5971 | *p = '\0'; |
5972 | p--; | 5972 | p--; |
5973 | do { | 5973 | while (1) { |
5974 | int esc; | 5974 | int esc; |
5975 | 5975 | ||
5976 | while ((unsigned char)*p != CTLARI) { | 5976 | while ((unsigned char)*p != CTLARI) { |
@@ -5988,7 +5988,7 @@ expari(int quotes) | |||
5988 | } | 5988 | } |
5989 | 5989 | ||
5990 | p -= esc + 1; | 5990 | p -= esc + 1; |
5991 | } while (1); | 5991 | } |
5992 | 5992 | ||
5993 | begoff = p - start; | 5993 | begoff = p - start; |
5994 | 5994 | ||