diff options
-rw-r--r-- | coreutils/stty.c | 6 | ||||
-rw-r--r-- | e2fsprogs/old_e2fsprogs/ext2fs/getsize.c | 2 | ||||
-rw-r--r-- | libbb/getopt32.c | 2 | ||||
-rw-r--r-- | modutils/insmod.c | 18 | ||||
-rw-r--r-- | modutils/modprobe.c | 4 | ||||
-rw-r--r-- | networking/route.c | 2 | ||||
-rw-r--r-- | networking/telnetd.c | 3 | ||||
-rw-r--r-- | runit/runsv.c | 3 | ||||
-rw-r--r-- | selinux/runcon.c | 3 | ||||
-rw-r--r-- | shell/hush.c | 4 | ||||
-rw-r--r-- | shell/lash.c | 8 | ||||
-rw-r--r-- | util-linux/ipcrm.c | 2 | ||||
-rw-r--r-- | util-linux/ipcs.c | 4 |
13 files changed, 30 insertions, 31 deletions
diff --git a/coreutils/stty.c b/coreutils/stty.c index 7493192..8757f24 100644 --- a/coreutils/stty.c +++ b/coreutils/stty.c @@ -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 */ diff --git a/e2fsprogs/old_e2fsprogs/ext2fs/getsize.c b/e2fsprogs/old_e2fsprogs/ext2fs/getsize.c index 516886c..63a0dca 100644 --- a/e2fsprogs/old_e2fsprogs/ext2fs/getsize.c +++ b/e2fsprogs/old_e2fsprogs/ext2fs/getsize.c @@ -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> diff --git a/libbb/getopt32.c b/libbb/getopt32.c index 28b4797..382d28a 100644 --- a/libbb/getopt32.c +++ b/libbb/getopt32.c @@ -445,7 +445,7 @@ getopt32(int argc, char **argv, const char *applet_opts, ...) } s--; } - va_end (p); + va_end(p); if (spec_flgs & FIRST_ARGV_IS_OPT) { if (argv[1] && argv[1][0] != '-' && argv[1][0] != '\0') { diff --git a/modutils/insmod.c b/modutils/insmod.c index d4575e0..7d5cf47 100644 --- a/modutils/insmod.c +++ b/modutils/insmod.c @@ -280,7 +280,7 @@ extern int insmod_ng_main( int argc, char **argv); #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 @@ arch_apply_relocation(struct obj_file *f, *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 @@ arch_apply_relocation(struct obj_file *f, } # endif /* __SH5__ */ -#elif defined (__v850e__) +#elif defined(__v850e__) case R_V850_NONE: break; @@ -1663,7 +1663,7 @@ bb_use_plt: 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 @@ bb_use_plt: /* 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 @@ bb_use_plt: #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 @@ static void arch_create_got(struct obj_file *f) got_needed = 1; continue; -#elif defined (__v850e__) +#elif defined(__v850e__) case R_V850_22_PCREL: plt_needed = 1; break; diff --git a/modutils/modprobe.c b/modutils/modprobe.c index 57e19b4..09494ca 100644 --- a/modutils/modprobe.c +++ b/modutils/modprobe.c @@ -686,8 +686,8 @@ static int check_pattern(const char* pat_src, const char* mod_src) { ret = fnmatch(pat, mod, 0); if (ENABLE_FEATURE_CLEAN_UP) { - free (pat); - free (mod); + free(pat); + free(mod); } return ret; diff --git a/networking/route.c b/networking/route.c index 0697390..5b3e68b 100644 --- a/networking/route.c +++ b/networking/route.c @@ -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 diff --git a/networking/telnetd.c b/networking/telnetd.c index 5c0463b..4ab6f56 100644 --- a/networking/telnetd.c +++ b/networking/telnetd.c @@ -285,8 +285,6 @@ make_new_session( /* 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 @@ make_new_session( 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)). */ diff --git a/runit/runsv.c b/runit/runsv.c index 61eb02e..bd4a81e 100644 --- a/runit/runsv.c +++ b/runit/runsv.c @@ -303,7 +303,8 @@ static void startservice(struct svdir *s) } 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); diff --git a/selinux/runcon.c b/selinux/runcon.c index a354387..9f61fdb 100644 --- a/selinux/runcon.c +++ b/selinux/runcon.c @@ -110,7 +110,7 @@ int runcon_main(int argc, char **argv) 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 @@ int runcon_main(int argc, char **argv) execvp(argv[0], argv); bb_perror_msg_and_die("cannot execute '%s'", argv[0]); - return 1; } diff --git a/shell/hush.c b/shell/hush.c index 5bc83bc..666604d 100644 --- a/shell/hush.c +++ b/shell/hush.c @@ -2044,7 +2044,7 @@ static int reserved_word(o_string *dest, struct p_context *ctx) *ctx = *old; /* physical copy */ free(old); } - b_reset (dest); + b_reset(dest); return 1; } } @@ -2666,7 +2666,7 @@ static void setup_job_control(void) 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); diff --git a/shell/lash.c b/shell/lash.c index 192900b..f9d9deb 100644 --- a/shell/lash.c +++ b/shell/lash.c @@ -582,7 +582,7 @@ static int setup_redirects(struct child_prog *prog, int squirrel[]) 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 @@ static int expand_arguments(char *command) 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 @@ static int expand_arguments(char *command) 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 @@ static void setup_job_control(void) if (status == (shell_pgrp = getpgrp ())) { break; } - kill (- shell_pgrp, SIGTTIN); + kill(- shell_pgrp, SIGTTIN); } /* Ignore interactive and job-control signals. */ diff --git a/util-linux/ipcrm.c b/util-linux/ipcrm.c index d13fb83..025f527 100644 --- a/util-linux/ipcrm.c +++ b/util-linux/ipcrm.c @@ -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 */ diff --git a/util-linux/ipcs.c b/util-linux/ipcs.c index 5a7b224..489480c 100644 --- a/util-linux/ipcs.c +++ b/util-linux/ipcs.c @@ -67,7 +67,7 @@ struct shm_info { /* 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 @@ union semun { <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 |