aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2011-03-02 04:07:14 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2011-03-02 04:07:14 +0100
commit940c7206c2a4acb386ab47199a6c313c04387f3b (patch)
tree9fb4aee464611ffd2cc6edbdf862149037e35f60 /shell
parent708dd4c98662670f3104b71c2fc5eef82bb726a8 (diff)
downloadbusybox-940c7206c2a4acb386ab47199a6c313c04387f3b.tar.gz
convert "do {...} while (1);" -> "while (1) {...}"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c16
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)
/* first remove from list */
jpp = curp = &curjob;
- do {
+ while (1) {
jp1 = *jpp;
if (jp1 == jp)
break;
jpp = &jp1->prev_job;
- } while (1);
+ }
*jpp = jp1->prev_job;
/* Then re-insert in correct position */
@@ -3560,14 +3560,14 @@ set_curjob(struct job *jp, unsigned mode)
case CUR_RUNNING:
/* newly created job or backgrounded job,
put after all stopped jobs. */
- do {
+ while (1) {
jp1 = *jpp;
#if JOBS
if (!jp1 || jp1->state != JOBSTOPPED)
#endif
break;
jpp = &jp1->prev_job;
- } while (1);
+ }
/* FALLTHROUGH */
#if JOBS
case CUR_STOPPED:
@@ -3740,7 +3740,7 @@ setjobctl(int on)
goto out;
/* fd is a tty at this point */
close_on_exec_on(fd);
- do { /* while we are in the background */
+ while (1) { /* while we are in the background */
pgrp = tcgetpgrp(fd);
if (pgrp < 0) {
out:
@@ -3751,7 +3751,7 @@ setjobctl(int on)
if (pgrp == getpgrp())
break;
killpg(0, SIGTTIN);
- } while (1);
+ }
initialpgrp = pgrp;
setsignal(SIGTSTP);
@@ -5970,7 +5970,7 @@ expari(int quotes)
p = expdest - 1;
*p = '\0';
p--;
- do {
+ while (1) {
int esc;
while ((unsigned char)*p != CTLARI) {
@@ -5988,7 +5988,7 @@ expari(int quotes)
}
p -= esc + 1;
- } while (1);
+ }
begoff = p - start;