diff options
author | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2007-04-10 15:42:06 +0000 |
---|---|---|
committer | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2007-04-10 15:42:06 +0000 |
commit | a1cce942064b62a2f238383d61c331b14ab764eb (patch) | |
tree | 82d252f04f9a8511be452dcd8b5e322c59653c72 | |
parent | b2ea681ba78e9de8abaabfd51e876aaf4c5198a9 (diff) | |
download | busybox-w32-a1cce942064b62a2f238383d61c331b14ab764eb.tar.gz busybox-w32-a1cce942064b62a2f238383d61c331b14ab764eb.tar.bz2 busybox-w32-a1cce942064b62a2f238383d61c331b14ab764eb.zip |
style fixes. No code changes.
git-svn-id: svn://busybox.net/trunk/busybox@18381 69ca8d6d-28ef-0310-b511-8ec308f3f277
-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 7493192e9..8757f247c 100644 --- a/coreutils/stty.c +++ b/coreutils/stty.c | |||
@@ -70,15 +70,15 @@ | |||
70 | 70 | ||
71 | /* SunOS 5.3 loses (^Z doesn't work) if 'swtch' is the same as 'susp'. | 71 | /* SunOS 5.3 loses (^Z doesn't work) if 'swtch' is the same as 'susp'. |
72 | So the default is to disable 'swtch.' */ | 72 | So the default is to disable 'swtch.' */ |
73 | #if defined (__sparc__) && defined (__svr4__) | 73 | #if defined(__sparc__) && defined(__svr4__) |
74 | # undef CSWTCH | 74 | # undef CSWTCH |
75 | # define CSWTCH _POSIX_VDISABLE | 75 | # define CSWTCH _POSIX_VDISABLE |
76 | #endif | 76 | #endif |
77 | 77 | ||
78 | #if defined(VWERSE) && !defined (VWERASE) /* AIX-3.2.5 */ | 78 | #if defined(VWERSE) && !defined(VWERASE) /* AIX-3.2.5 */ |
79 | # define VWERASE VWERSE | 79 | # define VWERASE VWERSE |
80 | #endif | 80 | #endif |
81 | #if defined(VDSUSP) && !defined (CDSUSP) | 81 | #if defined(VDSUSP) && !defined(CDSUSP) |
82 | # define CDSUSP Control('y') | 82 | # define CDSUSP Control('y') |
83 | #endif | 83 | #endif |
84 | #if !defined(VREPRINT) && defined(VRPRNT) /* Irix 4.0.5 */ | 84 | #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 516886c1f..63a0dcad9 100644 --- a/e2fsprogs/old_e2fsprogs/ext2fs/getsize.c +++ b/e2fsprogs/old_e2fsprogs/ext2fs/getsize.c | |||
@@ -55,7 +55,7 @@ | |||
55 | #include "ext2_fs.h" | 55 | #include "ext2_fs.h" |
56 | #include "ext2fs.h" | 56 | #include "ext2fs.h" |
57 | 57 | ||
58 | #if defined(__CYGWIN__) || defined (WIN32) | 58 | #if defined(__CYGWIN__) || defined(WIN32) |
59 | #include <windows.h> | 59 | #include <windows.h> |
60 | #include <winioctl.h> | 60 | #include <winioctl.h> |
61 | 61 | ||
diff --git a/libbb/getopt32.c b/libbb/getopt32.c index 28b47974e..382d28a4e 100644 --- a/libbb/getopt32.c +++ b/libbb/getopt32.c | |||
@@ -445,7 +445,7 @@ getopt32(int argc, char **argv, const char *applet_opts, ...) | |||
445 | } | 445 | } |
446 | s--; | 446 | s--; |
447 | } | 447 | } |
448 | va_end (p); | 448 | va_end(p); |
449 | 449 | ||
450 | if (spec_flgs & FIRST_ARGV_IS_OPT) { | 450 | if (spec_flgs & FIRST_ARGV_IS_OPT) { |
451 | if (argv[1] && argv[1][0] != '-' && argv[1][0] != '\0') { | 451 | if (argv[1] && argv[1][0] != '-' && argv[1][0] != '\0') { |
diff --git a/modutils/insmod.c b/modutils/insmod.c index d4575e03b..7d5cf473c 100644 --- a/modutils/insmod.c +++ b/modutils/insmod.c | |||
@@ -280,7 +280,7 @@ extern int insmod_ng_main( int argc, char **argv); | |||
280 | #endif | 280 | #endif |
281 | 281 | ||
282 | /* v850e */ | 282 | /* v850e */ |
283 | #if defined (__v850e__) | 283 | #if defined(__v850e__) |
284 | #define MATCH_MACHINE(x) ((x) == EM_V850 || (x) == EM_CYGNUS_V850) | 284 | #define MATCH_MACHINE(x) ((x) == EM_V850 || (x) == EM_CYGNUS_V850) |
285 | #define SHT_RELM SHT_RELA | 285 | #define SHT_RELM SHT_RELA |
286 | #define Elf32_RelM Elf32_Rela | 286 | #define Elf32_RelM Elf32_Rela |
@@ -982,7 +982,7 @@ arch_apply_relocation(struct obj_file *f, | |||
982 | *loc += v - got; | 982 | *loc += v - got; |
983 | break; | 983 | break; |
984 | 984 | ||
985 | #elif defined (__microblaze__) | 985 | #elif defined(__microblaze__) |
986 | case R_MICROBLAZE_NONE: | 986 | case R_MICROBLAZE_NONE: |
987 | case R_MICROBLAZE_64_NONE: | 987 | case R_MICROBLAZE_64_NONE: |
988 | case R_MICROBLAZE_32_SYM_OP_SYM: | 988 | case R_MICROBLAZE_32_SYM_OP_SYM: |
@@ -1540,7 +1540,7 @@ arch_apply_relocation(struct obj_file *f, | |||
1540 | } | 1540 | } |
1541 | # endif /* __SH5__ */ | 1541 | # endif /* __SH5__ */ |
1542 | 1542 | ||
1543 | #elif defined (__v850e__) | 1543 | #elif defined(__v850e__) |
1544 | 1544 | ||
1545 | case R_V850_NONE: | 1545 | case R_V850_NONE: |
1546 | break; | 1546 | break; |
@@ -1663,7 +1663,7 @@ bb_use_plt: | |||
1663 | ip[2] = 0x7d6903a6; /* mtctr r11 */ | 1663 | ip[2] = 0x7d6903a6; /* mtctr r11 */ |
1664 | ip[3] = 0x4e800420; /* bctr */ | 1664 | ip[3] = 0x4e800420; /* bctr */ |
1665 | #endif | 1665 | #endif |
1666 | #if defined (__v850e__) | 1666 | #if defined(__v850e__) |
1667 | /* We have to trash a register, so we assume that any control | 1667 | /* We have to trash a register, so we assume that any control |
1668 | transfer more than 21-bits away must be a function call | 1668 | transfer more than 21-bits away must be a function call |
1669 | (so we can use a call-clobbered register). */ | 1669 | (so we can use a call-clobbered register). */ |
@@ -1676,15 +1676,15 @@ bb_use_plt: | |||
1676 | /* relative distance to target */ | 1676 | /* relative distance to target */ |
1677 | v -= dot; | 1677 | v -= dot; |
1678 | /* if the target is too far away.... */ | 1678 | /* if the target is too far away.... */ |
1679 | #if defined (__arm__) || defined (__powerpc__) | 1679 | #if defined(__arm__) || defined(__powerpc__) |
1680 | if ((int)v < -0x02000000 || (int)v >= 0x02000000) | 1680 | if ((int)v < -0x02000000 || (int)v >= 0x02000000) |
1681 | #elif defined (__v850e__) | 1681 | #elif defined(__v850e__) |
1682 | if ((ElfW(Sword))v > 0x1fffff || (ElfW(Sword))v < (ElfW(Sword))-0x200000) | 1682 | if ((ElfW(Sword))v > 0x1fffff || (ElfW(Sword))v < (ElfW(Sword))-0x200000) |
1683 | #endif | 1683 | #endif |
1684 | /* go via the plt */ | 1684 | /* go via the plt */ |
1685 | v = plt + pe->offset - dot; | 1685 | v = plt + pe->offset - dot; |
1686 | 1686 | ||
1687 | #if defined (__v850e__) | 1687 | #if defined(__v850e__) |
1688 | if (v & 1) | 1688 | if (v & 1) |
1689 | #else | 1689 | #else |
1690 | if (v & 3) | 1690 | if (v & 3) |
@@ -1701,7 +1701,7 @@ bb_use_plt: | |||
1701 | #if defined(__powerpc__) | 1701 | #if defined(__powerpc__) |
1702 | *loc = (*loc & ~0x03fffffc) | (v & 0x03fffffc); | 1702 | *loc = (*loc & ~0x03fffffc) | (v & 0x03fffffc); |
1703 | #endif | 1703 | #endif |
1704 | #if defined (__v850e__) | 1704 | #if defined(__v850e__) |
1705 | /* We write two shorts instead of a long because even 32-bit insns | 1705 | /* We write two shorts instead of a long because even 32-bit insns |
1706 | only need half-word alignment, but the 32-bit data write needs | 1706 | only need half-word alignment, but the 32-bit data write needs |
1707 | to be long-word aligned. */ | 1707 | to be long-word aligned. */ |
@@ -1895,7 +1895,7 @@ static void arch_create_got(struct obj_file *f) | |||
1895 | got_needed = 1; | 1895 | got_needed = 1; |
1896 | continue; | 1896 | continue; |
1897 | 1897 | ||
1898 | #elif defined (__v850e__) | 1898 | #elif defined(__v850e__) |
1899 | case R_V850_22_PCREL: | 1899 | case R_V850_22_PCREL: |
1900 | plt_needed = 1; | 1900 | plt_needed = 1; |
1901 | break; | 1901 | break; |
diff --git a/modutils/modprobe.c b/modutils/modprobe.c index 57e19b4ab..09494ca5f 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) { | |||
686 | ret = fnmatch(pat, mod, 0); | 686 | ret = fnmatch(pat, mod, 0); |
687 | 687 | ||
688 | if (ENABLE_FEATURE_CLEAN_UP) { | 688 | if (ENABLE_FEATURE_CLEAN_UP) { |
689 | free (pat); | 689 | free(pat); |
690 | free (mod); | 690 | free(mod); |
691 | } | 691 | } |
692 | 692 | ||
693 | return ret; | 693 | return ret; |
diff --git a/networking/route.c b/networking/route.c index 069739006..5b3e68b4c 100644 --- a/networking/route.c +++ b/networking/route.c | |||
@@ -49,7 +49,7 @@ | |||
49 | #define RTF_REJECT 0x0200 /* Reject route */ | 49 | #define RTF_REJECT 0x0200 /* Reject route */ |
50 | #endif | 50 | #endif |
51 | 51 | ||
52 | #if defined (SIOCADDRTOLD) || defined (RTF_IRTT) /* route */ | 52 | #if defined(SIOCADDRTOLD) || defined(RTF_IRTT) /* route */ |
53 | #define HAVE_NEW_ADDRT 1 | 53 | #define HAVE_NEW_ADDRT 1 |
54 | #endif | 54 | #endif |
55 | 55 | ||
diff --git a/networking/telnetd.c b/networking/telnetd.c index 5c0463bab..4ab6f5656 100644 --- a/networking/telnetd.c +++ b/networking/telnetd.c | |||
@@ -285,8 +285,6 @@ make_new_session( | |||
285 | 285 | ||
286 | /* make new process group */ | 286 | /* make new process group */ |
287 | setsid(); | 287 | setsid(); |
288 | tcsetpgrp(0, getpid()); | ||
289 | /* ^^^ strace says: "ioctl(0, TIOCSPGRP, [pid]) = -1 ENOTTY" -- ??! */ | ||
290 | 288 | ||
291 | /* open the child's side of the tty. */ | 289 | /* open the child's side of the tty. */ |
292 | /* NB: setsid() disconnects from any previous ctty's. Therefore | 290 | /* NB: setsid() disconnects from any previous ctty's. Therefore |
@@ -296,6 +294,7 @@ make_new_session( | |||
296 | dup2(fd, 1); | 294 | dup2(fd, 1); |
297 | dup2(fd, 2); | 295 | dup2(fd, 2); |
298 | while (fd > 2) close(fd--); | 296 | while (fd > 2) close(fd--); |
297 | tcsetpgrp(0, getpid()); /* comment? */ | ||
299 | 298 | ||
300 | /* The pseudo-terminal allocated to the client is configured to operate in | 299 | /* The pseudo-terminal allocated to the client is configured to operate in |
301 | * cooked mode, and with XTABS CRMOD enabled (see tty(4)). */ | 300 | * cooked mode, and with XTABS CRMOD enabled (see tty(4)). */ |
diff --git a/runit/runsv.c b/runit/runsv.c index 61eb02e64..bd4a81eee 100644 --- a/runit/runsv.c +++ b/runit/runsv.c | |||
@@ -303,7 +303,8 @@ static void startservice(struct svdir *s) | |||
303 | } | 303 | } |
304 | run[1] = NULL; | 304 | run[1] = NULL; |
305 | 305 | ||
306 | if (s->pid != 0) stopservice(s); /* should never happen */ | 306 | if (s->pid != 0) |
307 | stopservice(s); /* should never happen */ | ||
307 | while ((p = fork()) == -1) { | 308 | while ((p = fork()) == -1) { |
308 | warn_cannot("fork, sleeping"); | 309 | warn_cannot("fork, sleeping"); |
309 | sleep(5); | 310 | sleep(5); |
diff --git a/selinux/runcon.c b/selinux/runcon.c index a3543878c..9f61fdbb6 100644 --- a/selinux/runcon.c +++ b/selinux/runcon.c | |||
@@ -110,7 +110,7 @@ int runcon_main(int argc, char **argv) | |||
110 | if (!(opts & OPTS_CONTEXT_COMPONENT)) { | 110 | if (!(opts & OPTS_CONTEXT_COMPONENT)) { |
111 | context = *argv++; | 111 | context = *argv++; |
112 | if (!argv[0]) | 112 | if (!argv[0]) |
113 | bb_error_msg_and_die("no command found"); | 113 | bb_error_msg_and_die("no command given"); |
114 | } | 114 | } |
115 | 115 | ||
116 | if (context) { | 116 | if (context) { |
@@ -133,5 +133,4 @@ int runcon_main(int argc, char **argv) | |||
133 | execvp(argv[0], argv); | 133 | execvp(argv[0], argv); |
134 | 134 | ||
135 | bb_perror_msg_and_die("cannot execute '%s'", argv[0]); | 135 | bb_perror_msg_and_die("cannot execute '%s'", argv[0]); |
136 | return 1; | ||
137 | } | 136 | } |
diff --git a/shell/hush.c b/shell/hush.c index 5bc83bc41..666604dd9 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -2044,7 +2044,7 @@ static int reserved_word(o_string *dest, struct p_context *ctx) | |||
2044 | *ctx = *old; /* physical copy */ | 2044 | *ctx = *old; /* physical copy */ |
2045 | free(old); | 2045 | free(old); |
2046 | } | 2046 | } |
2047 | b_reset (dest); | 2047 | b_reset(dest); |
2048 | return 1; | 2048 | return 1; |
2049 | } | 2049 | } |
2050 | } | 2050 | } |
@@ -2666,7 +2666,7 @@ static void setup_job_control(void) | |||
2666 | static pid_t shell_pgrp; | 2666 | static pid_t shell_pgrp; |
2667 | /* Loop until we are in the foreground. */ | 2667 | /* Loop until we are in the foreground. */ |
2668 | while (tcgetpgrp (shell_terminal) != (shell_pgrp = getpgrp ())) | 2668 | while (tcgetpgrp (shell_terminal) != (shell_pgrp = getpgrp ())) |
2669 | kill (- shell_pgrp, SIGTTIN); | 2669 | kill(- shell_pgrp, SIGTTIN); |
2670 | 2670 | ||
2671 | /* Ignore interactive and job-control signals. */ | 2671 | /* Ignore interactive and job-control signals. */ |
2672 | signal(SIGINT, SIG_IGN); | 2672 | signal(SIGINT, SIG_IGN); |
diff --git a/shell/lash.c b/shell/lash.c index 192900bb6..f9d9deb62 100644 --- a/shell/lash.c +++ b/shell/lash.c | |||
@@ -582,7 +582,7 @@ static int setup_redirects(struct child_prog *prog, int squirrel[]) | |||
582 | if (openfd != redir->fd) { | 582 | if (openfd != redir->fd) { |
583 | if (squirrel && redir->fd < 3) { | 583 | if (squirrel && redir->fd < 3) { |
584 | squirrel[redir->fd] = dup(redir->fd); | 584 | squirrel[redir->fd] = dup(redir->fd); |
585 | fcntl (squirrel[redir->fd], F_SETFD, FD_CLOEXEC); | 585 | fcntl(squirrel[redir->fd], F_SETFD, FD_CLOEXEC); |
586 | } | 586 | } |
587 | dup2(openfd, redir->fd); | 587 | dup2(openfd, redir->fd); |
588 | close(openfd); | 588 | close(openfd); |
@@ -763,7 +763,7 @@ static int expand_arguments(char *command) | |||
763 | free(tmpcmd); /* Free mem allocated by strsep_space */ | 763 | free(tmpcmd); /* Free mem allocated by strsep_space */ |
764 | if (retval == GLOB_NOSPACE) { | 764 | if (retval == GLOB_NOSPACE) { |
765 | /* Mem may have been allocated... */ | 765 | /* Mem may have been allocated... */ |
766 | globfree (&expand_result); | 766 | globfree(&expand_result); |
767 | bb_error_msg(out_of_space); | 767 | bb_error_msg(out_of_space); |
768 | return FALSE; | 768 | return FALSE; |
769 | } else if (retval != 0) { | 769 | } else if (retval != 0) { |
@@ -786,7 +786,7 @@ static int expand_arguments(char *command) | |||
786 | strcat(command+total_length, expand_result.gl_pathv[i]); | 786 | strcat(command+total_length, expand_result.gl_pathv[i]); |
787 | total_length += length; | 787 | total_length += length; |
788 | } | 788 | } |
789 | globfree (&expand_result); | 789 | globfree(&expand_result); |
790 | } | 790 | } |
791 | } | 791 | } |
792 | free(cmd_copy); | 792 | free(cmd_copy); |
@@ -1478,7 +1478,7 @@ static void setup_job_control(void) | |||
1478 | if (status == (shell_pgrp = getpgrp ())) { | 1478 | if (status == (shell_pgrp = getpgrp ())) { |
1479 | break; | 1479 | break; |
1480 | } | 1480 | } |
1481 | kill (- shell_pgrp, SIGTTIN); | 1481 | kill(- shell_pgrp, SIGTTIN); |
1482 | } | 1482 | } |
1483 | 1483 | ||
1484 | /* Ignore interactive and job-control signals. */ | 1484 | /* Ignore interactive and job-control signals. */ |
diff --git a/util-linux/ipcrm.c b/util-linux/ipcrm.c index d13fb83b1..025f527cf 100644 --- a/util-linux/ipcrm.c +++ b/util-linux/ipcrm.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <sys/msg.h> | 17 | #include <sys/msg.h> |
18 | #include <sys/sem.h> | 18 | #include <sys/sem.h> |
19 | 19 | ||
20 | #if defined (__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED) | 20 | #if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED) |
21 | /* union semun is defined by including <sys/sem.h> */ | 21 | /* union semun is defined by including <sys/sem.h> */ |
22 | #else | 22 | #else |
23 | /* according to X/OPEN we have to define it ourselves */ | 23 | /* according to X/OPEN we have to define it ourselves */ |
diff --git a/util-linux/ipcs.c b/util-linux/ipcs.c index 5a7b22434..489480c85 100644 --- a/util-linux/ipcs.c +++ b/util-linux/ipcs.c | |||
@@ -67,7 +67,7 @@ struct shm_info { | |||
67 | /* The last arg of semctl is a union semun, but where is it defined? | 67 | /* The last arg of semctl is a union semun, but where is it defined? |
68 | X/OPEN tells us to define it ourselves, but until recently | 68 | X/OPEN tells us to define it ourselves, but until recently |
69 | Linux include files would also define it. */ | 69 | Linux include files would also define it. */ |
70 | #if defined (__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED) | 70 | #if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED) |
71 | /* union semun is defined by including <sys/sem.h> */ | 71 | /* union semun is defined by including <sys/sem.h> */ |
72 | #else | 72 | #else |
73 | /* according to X/OPEN we have to define it ourselves */ | 73 | /* according to X/OPEN we have to define it ourselves */ |
@@ -84,7 +84,7 @@ union semun { | |||
84 | <linux/ipc.h>, which defines a struct ipc_perm with such fields. | 84 | <linux/ipc.h>, which defines a struct ipc_perm with such fields. |
85 | glibc-1.09 has no support for sysv ipc. | 85 | glibc-1.09 has no support for sysv ipc. |
86 | glibc 2 uses __key, __seq */ | 86 | glibc 2 uses __key, __seq */ |
87 | #if defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1 | 87 | #if defined(__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1 |
88 | #define KEY __key | 88 | #define KEY __key |
89 | #else | 89 | #else |
90 | #define KEY key | 90 | #define KEY key |