svn commit: trunk/busybox: coreutils e2fsprogs/old_e2fsprogs/ext2fs etc...

vda at busybox.net vda at busybox.net
Tue Apr 10 15:42:08 UTC 2007


Author: vda
Date: 2007-04-10 08:42:06 -0700 (Tue, 10 Apr 2007)
New Revision: 18381

Log:
style fixes. No code changes.



Modified:
   trunk/busybox/coreutils/stty.c
   trunk/busybox/e2fsprogs/old_e2fsprogs/ext2fs/getsize.c
   trunk/busybox/libbb/getopt32.c
   trunk/busybox/modutils/insmod.c
   trunk/busybox/modutils/modprobe.c
   trunk/busybox/networking/route.c
   trunk/busybox/networking/telnetd.c
   trunk/busybox/runit/runsv.c
   trunk/busybox/selinux/runcon.c
   trunk/busybox/shell/hush.c
   trunk/busybox/shell/lash.c
   trunk/busybox/util-linux/ipcrm.c
   trunk/busybox/util-linux/ipcs.c


Changeset:
Modified: trunk/busybox/coreutils/stty.c
===================================================================
--- trunk/busybox/coreutils/stty.c	2007-04-10 14:16:19 UTC (rev 18380)
+++ trunk/busybox/coreutils/stty.c	2007-04-10 15:42:06 UTC (rev 18381)
@@ -70,15 +70,15 @@
 
 /* SunOS 5.3 loses (^Z doesn't work) if 'swtch' is the same as 'susp'.
    So the default is to disable 'swtch.'  */
-#if defined (__sparc__) && defined (__svr4__)
+#if defined(__sparc__) && defined(__svr4__)
 # undef CSWTCH
 # define CSWTCH _POSIX_VDISABLE
 #endif
 
-#if defined(VWERSE) && !defined (VWERASE)       /* AIX-3.2.5 */
+#if defined(VWERSE) && !defined(VWERASE)       /* AIX-3.2.5 */
 # define VWERASE VWERSE
 #endif
-#if defined(VDSUSP) && !defined (CDSUSP)
+#if defined(VDSUSP) && !defined(CDSUSP)
 # define CDSUSP Control('y')
 #endif
 #if !defined(VREPRINT) && defined(VRPRNT)       /* Irix 4.0.5 */

Modified: trunk/busybox/e2fsprogs/old_e2fsprogs/ext2fs/getsize.c
===================================================================
--- trunk/busybox/e2fsprogs/old_e2fsprogs/ext2fs/getsize.c	2007-04-10 14:16:19 UTC (rev 18380)
+++ trunk/busybox/e2fsprogs/old_e2fsprogs/ext2fs/getsize.c	2007-04-10 15:42:06 UTC (rev 18381)
@@ -55,7 +55,7 @@
 #include "ext2_fs.h"
 #include "ext2fs.h"
 
-#if defined(__CYGWIN__) || defined (WIN32)
+#if defined(__CYGWIN__) || defined(WIN32)
 #include <windows.h>
 #include <winioctl.h>
 

Modified: trunk/busybox/libbb/getopt32.c
===================================================================
--- trunk/busybox/libbb/getopt32.c	2007-04-10 14:16:19 UTC (rev 18380)
+++ trunk/busybox/libbb/getopt32.c	2007-04-10 15:42:06 UTC (rev 18381)
@@ -445,7 +445,7 @@
 		}
 		s--;
 	}
-	va_end (p);
+	va_end(p);
 
 	if (spec_flgs & FIRST_ARGV_IS_OPT) {
 		if (argv[1] && argv[1][0] != '-' && argv[1][0] != '\0') {

Modified: trunk/busybox/modutils/insmod.c
===================================================================
--- trunk/busybox/modutils/insmod.c	2007-04-10 14:16:19 UTC (rev 18380)
+++ trunk/busybox/modutils/insmod.c	2007-04-10 15:42:06 UTC (rev 18381)
@@ -280,7 +280,7 @@
 #endif
 
 /* v850e */
-#if defined (__v850e__)
+#if defined(__v850e__)
 #define MATCH_MACHINE(x) ((x) == EM_V850 || (x) == EM_CYGNUS_V850)
 #define SHT_RELM	SHT_RELA
 #define Elf32_RelM	Elf32_Rela
@@ -982,7 +982,7 @@
 			*loc += v - got;
 			break;
 
-#elif defined (__microblaze__)
+#elif defined(__microblaze__)
 		case R_MICROBLAZE_NONE:
 		case R_MICROBLAZE_64_NONE:
 		case R_MICROBLAZE_32_SYM_OP_SYM:
@@ -1540,7 +1540,7 @@
 			}
 # endif /* __SH5__ */
 
-#elif defined (__v850e__)
+#elif defined(__v850e__)
 
 		case R_V850_NONE:
 			break;
@@ -1663,7 +1663,7 @@
 				ip[2] = 0x7d6903a6;			      /* mtctr r11 */
 				ip[3] = 0x4e800420;			      /* bctr */
 #endif
-#if defined (__v850e__)
+#if defined(__v850e__)
 				/* We have to trash a register, so we assume that any control
 				   transfer more than 21-bits away must be a function call
 				   (so we can use a call-clobbered register).  */
@@ -1676,15 +1676,15 @@
 			/* relative distance to target */
 			v -= dot;
 			/* if the target is too far away.... */
-#if defined (__arm__) || defined (__powerpc__)
+#if defined(__arm__) || defined(__powerpc__)
 			if ((int)v < -0x02000000 || (int)v >= 0x02000000)
-#elif defined (__v850e__)
+#elif defined(__v850e__)
 				if ((ElfW(Sword))v > 0x1fffff || (ElfW(Sword))v < (ElfW(Sword))-0x200000)
 #endif
 					/* go via the plt */
 					v = plt + pe->offset - dot;
 
-#if defined (__v850e__)
+#if defined(__v850e__)
 			if (v & 1)
 #else
 				if (v & 3)
@@ -1701,7 +1701,7 @@
 #if defined(__powerpc__)
 			*loc = (*loc & ~0x03fffffc) | (v & 0x03fffffc);
 #endif
-#if defined (__v850e__)
+#if defined(__v850e__)
 			/* We write two shorts instead of a long because even 32-bit insns
 			   only need half-word alignment, but the 32-bit data write needs
 			   to be long-word aligned.  */
@@ -1895,7 +1895,7 @@
 				got_needed = 1;
 				continue;
 
-#elif defined (__v850e__)
+#elif defined(__v850e__)
 			case R_V850_22_PCREL:
 				plt_needed = 1;
 				break;

Modified: trunk/busybox/modutils/modprobe.c
===================================================================
--- trunk/busybox/modutils/modprobe.c	2007-04-10 14:16:19 UTC (rev 18380)
+++ trunk/busybox/modutils/modprobe.c	2007-04-10 15:42:06 UTC (rev 18381)
@@ -686,8 +686,8 @@
 		ret = fnmatch(pat, mod, 0);
 
 		if (ENABLE_FEATURE_CLEAN_UP) {
-			free (pat);
-			free (mod);
+			free(pat);
+			free(mod);
 		}
 
 		return ret;

Modified: trunk/busybox/networking/route.c
===================================================================
--- trunk/busybox/networking/route.c	2007-04-10 14:16:19 UTC (rev 18380)
+++ trunk/busybox/networking/route.c	2007-04-10 15:42:06 UTC (rev 18381)
@@ -49,7 +49,7 @@
 #define RTF_REJECT      0x0200	/* Reject route                 */
 #endif
 
-#if defined (SIOCADDRTOLD) || defined (RTF_IRTT)	/* route */
+#if defined(SIOCADDRTOLD) || defined(RTF_IRTT)	/* route */
 #define HAVE_NEW_ADDRT 1
 #endif
 

Modified: trunk/busybox/networking/telnetd.c
===================================================================
--- trunk/busybox/networking/telnetd.c	2007-04-10 14:16:19 UTC (rev 18380)
+++ trunk/busybox/networking/telnetd.c	2007-04-10 15:42:06 UTC (rev 18381)
@@ -285,8 +285,6 @@
 
 	/* make new process group */
 	setsid();
-	tcsetpgrp(0, getpid());
-	/* ^^^ strace says: "ioctl(0, TIOCSPGRP, [pid]) = -1 ENOTTY" -- ??! */
 
 	/* open the child's side of the tty. */
 	/* NB: setsid() disconnects from any previous ctty's. Therefore
@@ -296,6 +294,7 @@
 	dup2(fd, 1);
 	dup2(fd, 2);
 	while (fd > 2) close(fd--);
+	tcsetpgrp(0, getpid()); /* comment? */
 
 	/* The pseudo-terminal allocated to the client is configured to operate in
 	 * cooked mode, and with XTABS CRMOD enabled (see tty(4)). */

Modified: trunk/busybox/runit/runsv.c
===================================================================
--- trunk/busybox/runit/runsv.c	2007-04-10 14:16:19 UTC (rev 18380)
+++ trunk/busybox/runit/runsv.c	2007-04-10 15:42:06 UTC (rev 18381)
@@ -303,7 +303,8 @@
 	}
 	run[1] = NULL;
 
-	if (s->pid != 0) stopservice(s); /* should never happen */
+	if (s->pid != 0)
+		stopservice(s); /* should never happen */
 	while ((p = fork()) == -1) {
 		warn_cannot("fork, sleeping");
 		sleep(5);

Modified: trunk/busybox/selinux/runcon.c
===================================================================
--- trunk/busybox/selinux/runcon.c	2007-04-10 14:16:19 UTC (rev 18380)
+++ trunk/busybox/selinux/runcon.c	2007-04-10 15:42:06 UTC (rev 18381)
@@ -110,7 +110,7 @@
 	if (!(opts & OPTS_CONTEXT_COMPONENT)) {
 		context = *argv++;
 		if (!argv[0])
-			bb_error_msg_and_die("no command found");
+			bb_error_msg_and_die("no command given");
 	}
 
 	if (context) {
@@ -133,5 +133,4 @@
 	execvp(argv[0], argv);
 
 	bb_perror_msg_and_die("cannot execute '%s'", argv[0]);
-	return 1;
 }

Modified: trunk/busybox/shell/hush.c
===================================================================
--- trunk/busybox/shell/hush.c	2007-04-10 14:16:19 UTC (rev 18380)
+++ trunk/busybox/shell/hush.c	2007-04-10 15:42:06 UTC (rev 18381)
@@ -2044,7 +2044,7 @@
 				*ctx = *old;   /* physical copy */
 				free(old);
 			}
-			b_reset (dest);
+			b_reset(dest);
 			return 1;
 		}
 	}
@@ -2666,7 +2666,7 @@
 	static pid_t shell_pgrp;
 	/* Loop until we are in the foreground.  */
 	while (tcgetpgrp (shell_terminal) != (shell_pgrp = getpgrp ()))
-		kill (- shell_pgrp, SIGTTIN);
+		kill(- shell_pgrp, SIGTTIN);
 
 	/* Ignore interactive and job-control signals.  */
 	signal(SIGINT, SIG_IGN);

Modified: trunk/busybox/shell/lash.c
===================================================================
--- trunk/busybox/shell/lash.c	2007-04-10 14:16:19 UTC (rev 18380)
+++ trunk/busybox/shell/lash.c	2007-04-10 15:42:06 UTC (rev 18381)
@@ -582,7 +582,7 @@
 		if (openfd != redir->fd) {
 			if (squirrel && redir->fd < 3) {
 				squirrel[redir->fd] = dup(redir->fd);
-				fcntl (squirrel[redir->fd], F_SETFD, FD_CLOEXEC);
+				fcntl(squirrel[redir->fd], F_SETFD, FD_CLOEXEC);
 			}
 			dup2(openfd, redir->fd);
 			close(openfd);
@@ -763,7 +763,7 @@
 		free(tmpcmd); /* Free mem allocated by strsep_space */
 		if (retval == GLOB_NOSPACE) {
 			/* Mem may have been allocated... */
-			globfree (&expand_result);
+			globfree(&expand_result);
 			bb_error_msg(out_of_space);
 			return FALSE;
 		} else if (retval != 0) {
@@ -786,7 +786,7 @@
 				strcat(command+total_length, expand_result.gl_pathv[i]);
 				total_length += length;
 			}
-			globfree (&expand_result);
+			globfree(&expand_result);
 		}
 	}
 	free(cmd_copy);
@@ -1478,7 +1478,7 @@
 		if (status == (shell_pgrp = getpgrp ())) {
 			break;
 		}
-		kill (- shell_pgrp, SIGTTIN);
+		kill(- shell_pgrp, SIGTTIN);
 	}
 
 	/* Ignore interactive and job-control signals.  */

Modified: trunk/busybox/util-linux/ipcrm.c
===================================================================
--- trunk/busybox/util-linux/ipcrm.c	2007-04-10 14:16:19 UTC (rev 18380)
+++ trunk/busybox/util-linux/ipcrm.c	2007-04-10 15:42:06 UTC (rev 18381)
@@ -17,7 +17,7 @@
 #include <sys/msg.h>
 #include <sys/sem.h>
 
-#if defined (__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)
+#if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)
 /* union semun is defined by including <sys/sem.h> */
 #else
 /* according to X/OPEN we have to define it ourselves */

Modified: trunk/busybox/util-linux/ipcs.c
===================================================================
--- trunk/busybox/util-linux/ipcs.c	2007-04-10 14:16:19 UTC (rev 18380)
+++ trunk/busybox/util-linux/ipcs.c	2007-04-10 15:42:06 UTC (rev 18381)
@@ -67,7 +67,7 @@
 /* The last arg of semctl is a union semun, but where is it defined?
    X/OPEN tells us to define it ourselves, but until recently
    Linux include files would also define it. */
-#if defined (__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)
+#if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)
 /* union semun is defined by including <sys/sem.h> */
 #else
 /* according to X/OPEN we have to define it ourselves */
@@ -84,7 +84,7 @@
    <linux/ipc.h>, which defines a struct ipc_perm with such fields.
    glibc-1.09 has no support for sysv ipc.
    glibc 2 uses __key, __seq */
-#if defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1
+#if defined(__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1
 #define KEY __key
 #else
 #define KEY key




More information about the busybox-cvs mailing list