svn commit: trunk/busybox/shell

vda at busybox.net vda at busybox.net
Mon Jun 23 13:24:21 UTC 2008


Author: vda
Date: 2008-06-23 06:24:19 -0700 (Mon, 23 Jun 2008)
New Revision: 22479

Log:
ash: trivial code readability fixes



Modified:
   trunk/busybox/shell/ash.c


Changeset:
Modified: trunk/busybox/shell/ash.c
===================================================================
--- trunk/busybox/shell/ash.c	2008-06-23 13:06:34 UTC (rev 22478)
+++ trunk/busybox/shell/ash.c	2008-06-23 13:24:19 UTC (rev 22479)
@@ -357,7 +357,7 @@
 	gotsig[signo - 1] = 1;
 	pendingsig = signo;
 
-	if ( /* exsig || */ (signo == SIGINT && !trap[SIGINT])) {
+	if (/* exsig || */ (signo == SIGINT && !trap[SIGINT])) {
 		if (!suppressint) {
 			pendingsig = 0;
 			raise_interrupt(); /* does not return */
@@ -1595,7 +1595,7 @@
 			return '\0';
 	}
 	c = *p++;
-	for (q = optstring; *q != c; ) {
+	for (q = optstring; *q != c;) {
 		if (*q == '\0')
 			ash_msg_and_raise_error("illegal option -%c", c);
 		if (*++q == ':')
@@ -6408,7 +6408,7 @@
 						q = p;
 						if (*p == CTLESC)
 							p++;
-						if (strchr(ifs, *p) == NULL ) {
+						if (strchr(ifs, *p) == NULL) {
 							p = q;
 							break;
 						}
@@ -6600,7 +6600,7 @@
 		return list;
 	half = len >> 1;
 	p = list;
-	for (n = half; --n >= 0; ) {
+	for (n = half; --n >= 0;) {
 		q = p;
 		p = p->next;
 	}
@@ -6960,7 +6960,7 @@
 	}
 	exitstatus = exerrno;
 	TRACE(("shellexec failed for %s, errno %d, suppressint %d\n",
-		argv[0], e, suppressint ));
+		argv[0], e, suppressint));
 	ash_msg_and_raise(EXEXEC, "%s: %s", argv[0], errmsg(e, "not found"));
 	/* NOTREACHED */
 }
@@ -7731,6 +7731,7 @@
 #define SKIPEVAL       (1 << 4)
 static int skipcount;           /* number of levels to skip */
 static int funcnest;            /* depth of function calls */
+static int loopnest;            /* current loop nesting level */
 
 /* forward decl way out to parsing code - dotrap needs it */
 static int evalstring(char *s, int mask);
@@ -7902,8 +7903,6 @@
 #endif
 void evaltreenr(union node *, int) __attribute__ ((alias("evaltree"),__noreturn__));
 
-static int loopnest;            /* current loop nesting level */
-
 static void
 evalloop(union node *n, int flags)
 {
@@ -9677,7 +9676,7 @@
 	}
 
 	c = *p++;
-	for (q = optstr; *q != c; ) {
+	for (q = optstr; *q != c;) {
 		if (*q == '\0') {
 			if (optstr[0] == ':') {
 				s[0] = c;
@@ -13474,7 +13473,7 @@
 
 	if (sflag || minusc == NULL) {
 #if ENABLE_FEATURE_EDITING_SAVEHISTORY
-		if ( iflag ) {
+		if (iflag) {
 			const char *hp = lookupvar("HISTFILE");
 
 			if (hp != NULL)




More information about the busybox-cvs mailing list