diff options
82 files changed, 185 insertions, 183 deletions
diff --git a/archival/dpkg.c b/archival/dpkg.c index 07f01501b..508b4297b 100644 --- a/archival/dpkg.c +++ b/archival/dpkg.c | |||
@@ -866,7 +866,7 @@ static void write_status_file(deb_file_t **deb_file) | |||
866 | write_flag = TRUE; | 866 | write_flag = TRUE; |
867 | fputs("\n", new_status_file); | 867 | fputs("\n", new_status_file); |
868 | } | 868 | } |
869 | else if (strcmp("config-files", name_hashtable[state_status]) == 0) { | 869 | else if (strcmp("config-files", name_hashtable[state_status]) == 0) { |
870 | /* only change the status line */ | 870 | /* only change the status line */ |
871 | while (1) { | 871 | while (1) { |
872 | char *field_name; | 872 | char *field_name; |
diff --git a/archival/gzip.c b/archival/gzip.c index 4d399063d..80141f380 100644 --- a/archival/gzip.c +++ b/archival/gzip.c | |||
@@ -68,7 +68,7 @@ aa: 85.1% -- replaced with aa.gz | |||
68 | */ | 68 | */ |
69 | #define SMALL_MEM | 69 | #define SMALL_MEM |
70 | 70 | ||
71 | #ifndef INBUFSIZ | 71 | #ifndef INBUFSIZ |
72 | # ifdef SMALL_MEM | 72 | # ifdef SMALL_MEM |
73 | # define INBUFSIZ 0x2000 /* input buffer size */ | 73 | # define INBUFSIZ 0x2000 /* input buffer size */ |
74 | # else | 74 | # else |
@@ -76,7 +76,7 @@ aa: 85.1% -- replaced with aa.gz | |||
76 | # endif | 76 | # endif |
77 | #endif | 77 | #endif |
78 | 78 | ||
79 | #ifndef OUTBUFSIZ | 79 | #ifndef OUTBUFSIZ |
80 | # ifdef SMALL_MEM | 80 | # ifdef SMALL_MEM |
81 | # define OUTBUFSIZ 8192 /* output buffer size */ | 81 | # define OUTBUFSIZ 8192 /* output buffer size */ |
82 | # else | 82 | # else |
diff --git a/archival/libunarchive/decompress_uncompress.c b/archival/libunarchive/decompress_uncompress.c index 1ff89ce3c..285b4efeb 100644 --- a/archival/libunarchive/decompress_uncompress.c +++ b/archival/libunarchive/decompress_uncompress.c | |||
@@ -29,10 +29,10 @@ | |||
29 | 29 | ||
30 | 30 | ||
31 | /* Default input buffer size */ | 31 | /* Default input buffer size */ |
32 | #define IBUFSIZ 2048 | 32 | #define IBUFSIZ 2048 |
33 | 33 | ||
34 | /* Default output buffer size */ | 34 | /* Default output buffer size */ |
35 | #define OBUFSIZ 2048 | 35 | #define OBUFSIZ 2048 |
36 | 36 | ||
37 | /* Defines for third byte of header */ | 37 | /* Defines for third byte of header */ |
38 | #define BIT_MASK 0x1f /* Mask for 'number of compresssion bits' */ | 38 | #define BIT_MASK 0x1f /* Mask for 'number of compresssion bits' */ |
diff --git a/coreutils/env.c b/coreutils/env.c index f50ee7869..d64a71439 100644 --- a/coreutils/env.c +++ b/coreutils/env.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * env implementation for busybox | 3 | * env implementation for busybox |
4 | * | 4 | * |
5 | * Copyright (c) 1988, 1993, 1994 | 5 | * Copyright (c) 1988, 1993, 1994 |
6 | * The Regents of the University of California. All rights reserved. | 6 | * The Regents of the University of California. All rights reserved. |
7 | * | 7 | * |
8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
9 | * | 9 | * |
@@ -103,8 +103,8 @@ int env_main(int argc UNUSED_PARAM, char **argv) | |||
103 | * notice, this list of conditions and the following disclaimer in the | 103 | * notice, this list of conditions and the following disclaimer in the |
104 | * documentation and/or other materials provided with the distribution. | 104 | * documentation and/or other materials provided with the distribution. |
105 | * | 105 | * |
106 | * 3. <BSD Advertising Clause omitted per the July 22, 1999 licensing change | 106 | * 3. BSD Advertising Clause omitted per the July 22, 1999 licensing change |
107 | * ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change> | 107 | * ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change |
108 | * | 108 | * |
109 | * 4. Neither the name of the University nor the names of its contributors | 109 | * 4. Neither the name of the University nor the names of its contributors |
110 | * may be used to endorse or promote products derived from this software | 110 | * may be used to endorse or promote products derived from this software |
diff --git a/coreutils/md5_sha1_sum.c b/coreutils/md5_sha1_sum.c index d3d294de9..3b897c18f 100644 --- a/coreutils/md5_sha1_sum.c +++ b/coreutils/md5_sha1_sum.c | |||
@@ -18,9 +18,9 @@ enum { | |||
18 | HASH_SHA512 = '5', | 18 | HASH_SHA512 = '5', |
19 | }; | 19 | }; |
20 | 20 | ||
21 | #define FLAG_SILENT 1 | 21 | #define FLAG_SILENT 1 |
22 | #define FLAG_CHECK 2 | 22 | #define FLAG_CHECK 2 |
23 | #define FLAG_WARN 4 | 23 | #define FLAG_WARN 4 |
24 | 24 | ||
25 | /* This might be useful elsewhere */ | 25 | /* This might be useful elsewhere */ |
26 | static unsigned char *hash_bin_to_hex(unsigned char *hash_value, | 26 | static unsigned char *hash_bin_to_hex(unsigned char *hash_value, |
diff --git a/coreutils/mkfifo.c b/coreutils/mkfifo.c index 4388ccaa3..d908ce45e 100644 --- a/coreutils/mkfifo.c +++ b/coreutils/mkfifo.c | |||
@@ -30,7 +30,7 @@ int mkfifo_main(int argc UNUSED_PARAM, char **argv) | |||
30 | 30 | ||
31 | do { | 31 | do { |
32 | if (mkfifo(*argv, mode) < 0) { | 32 | if (mkfifo(*argv, mode) < 0) { |
33 | bb_simple_perror_msg(*argv); /* Avoid multibyte problems. */ | 33 | bb_simple_perror_msg(*argv); /* Avoid multibyte problems. */ |
34 | retval = EXIT_FAILURE; | 34 | retval = EXIT_FAILURE; |
35 | } | 35 | } |
36 | } while (*++argv); | 36 | } while (*++argv); |
diff --git a/coreutils/od.c b/coreutils/od.c index 30b5bd676..dcd693446 100644 --- a/coreutils/od.c +++ b/coreutils/od.c | |||
@@ -110,7 +110,7 @@ odoffset(dumper_t *dumper, int argc, char ***argvp) | |||
110 | * the offset is changed as well. This isn't pretty, | 110 | * the offset is changed as well. This isn't pretty, |
111 | * but it's easy. | 111 | * but it's easy. |
112 | */ | 112 | */ |
113 | #define TYPE_OFFSET 7 | 113 | #define TYPE_OFFSET 7 |
114 | { | 114 | { |
115 | char x_or_d; | 115 | char x_or_d; |
116 | if (base == 16) { | 116 | if (base == 16) { |
@@ -130,19 +130,19 @@ odoffset(dumper_t *dumper, int argc, char ***argvp) | |||
130 | } | 130 | } |
131 | 131 | ||
132 | static const char *const add_strings[] = { | 132 | static const char *const add_strings[] = { |
133 | "16/1 \"%3_u \" \"\\n\"", /* a */ | 133 | "16/1 \"%3_u \" \"\\n\"", /* a */ |
134 | "8/2 \" %06o \" \"\\n\"", /* B, o */ | 134 | "8/2 \" %06o \" \"\\n\"", /* B, o */ |
135 | "16/1 \"%03o \" \"\\n\"", /* b */ | 135 | "16/1 \"%03o \" \"\\n\"", /* b */ |
136 | "16/1 \"%3_c \" \"\\n\"", /* c */ | 136 | "16/1 \"%3_c \" \"\\n\"", /* c */ |
137 | "8/2 \" %05u \" \"\\n\"", /* d */ | 137 | "8/2 \" %05u \" \"\\n\"", /* d */ |
138 | "4/4 \" %010u \" \"\\n\"", /* D */ | 138 | "4/4 \" %010u \" \"\\n\"", /* D */ |
139 | "2/8 \" %21.14e \" \"\\n\"", /* e (undocumented in od), F */ | 139 | "2/8 \" %21.14e \" \"\\n\"", /* e (undocumented in od), F */ |
140 | "4/4 \" %14.7e \" \"\\n\"", /* f */ | 140 | "4/4 \" %14.7e \" \"\\n\"", /* f */ |
141 | "4/4 \" %08x \" \"\\n\"", /* H, X */ | 141 | "4/4 \" %08x \" \"\\n\"", /* H, X */ |
142 | "8/2 \" %04x \" \"\\n\"", /* h, x */ | 142 | "8/2 \" %04x \" \"\\n\"", /* h, x */ |
143 | "4/4 \" %11d \" \"\\n\"", /* I, L, l */ | 143 | "4/4 \" %11d \" \"\\n\"", /* I, L, l */ |
144 | "8/2 \" %6d \" \"\\n\"", /* i */ | 144 | "8/2 \" %6d \" \"\\n\"", /* i */ |
145 | "4/4 \" %011o \" \"\\n\"", /* O */ | 145 | "4/4 \" %011o \" \"\\n\"", /* O */ |
146 | }; | 146 | }; |
147 | 147 | ||
148 | static const char od_opts[] ALIGN1 = "aBbcDdeFfHhIiLlOoXxv"; | 148 | static const char od_opts[] ALIGN1 = "aBbcDdeFfHhIiLlOoXxv"; |
diff --git a/coreutils/rmdir.c b/coreutils/rmdir.c index 75bfc2813..231793ce0 100644 --- a/coreutils/rmdir.c +++ b/coreutils/rmdir.c | |||
@@ -50,7 +50,7 @@ int rmdir_main(int argc UNUSED_PARAM, char **argv) | |||
50 | if ((flags & IGNORE_NON_EMPTY) && errno == ENOTEMPTY) | 50 | if ((flags & IGNORE_NON_EMPTY) && errno == ENOTEMPTY) |
51 | break; | 51 | break; |
52 | #endif | 52 | #endif |
53 | bb_perror_msg("'%s'", path); /* Match gnu rmdir msg. */ | 53 | bb_perror_msg("'%s'", path); /* Match gnu rmdir msg. */ |
54 | status = EXIT_FAILURE; | 54 | status = EXIT_FAILURE; |
55 | } else if (flags & PARENTS) { | 55 | } else if (flags & PARENTS) { |
56 | /* Note: path was not "" since rmdir succeeded. */ | 56 | /* Note: path was not "" since rmdir succeeded. */ |
diff --git a/coreutils/stat.c b/coreutils/stat.c index d176d07ea..b4e6f10fd 100644 --- a/coreutils/stat.c +++ b/coreutils/stat.c | |||
@@ -469,7 +469,7 @@ static bool do_statfs(const char *filename, const char *format) | |||
469 | if (scontext) | 469 | if (scontext) |
470 | freecon(scontext); | 470 | freecon(scontext); |
471 | # endif | 471 | # endif |
472 | #endif /* FEATURE_STAT_FORMAT */ | 472 | #endif /* FEATURE_STAT_FORMAT */ |
473 | return 1; | 473 | return 1; |
474 | } | 474 | } |
475 | 475 | ||
@@ -635,7 +635,7 @@ static bool do_stat(const char *filename, const char *format) | |||
635 | human_time(statbuf.st_mtime), | 635 | human_time(statbuf.st_mtime), |
636 | human_time(statbuf.st_ctime)); | 636 | human_time(statbuf.st_ctime)); |
637 | } | 637 | } |
638 | #endif /* FEATURE_STAT_FORMAT */ | 638 | #endif /* FEATURE_STAT_FORMAT */ |
639 | return 1; | 639 | return 1; |
640 | } | 640 | } |
641 | 641 | ||
diff --git a/coreutils/stty.c b/coreutils/stty.c index 0cb4fb234..e28e15c97 100644 --- a/coreutils/stty.c +++ b/coreutils/stty.c | |||
@@ -1110,16 +1110,16 @@ static void set_mode(const struct mode_info *info, int reversed, | |||
1110 | if (reversed) | 1110 | if (reversed) |
1111 | mode->c_cflag = (mode->c_cflag & ~PARENB & ~CSIZE) | CS8; | 1111 | mode->c_cflag = (mode->c_cflag & ~PARENB & ~CSIZE) | CS8; |
1112 | else | 1112 | else |
1113 | mode->c_cflag = (mode->c_cflag & ~PARODD & ~CSIZE) | PARENB | CS7; | 1113 | mode->c_cflag = (mode->c_cflag & ~PARODD & ~CSIZE) | PARENB | CS7; |
1114 | } else if (info == &mode_info[IDX_oddp]) { | 1114 | } else if (info == &mode_info[IDX_oddp]) { |
1115 | if (reversed) | 1115 | if (reversed) |
1116 | mode->c_cflag = (mode->c_cflag & ~PARENB & ~CSIZE) | CS8; | 1116 | mode->c_cflag = (mode->c_cflag & ~PARENB & ~CSIZE) | CS8; |
1117 | else | 1117 | else |
1118 | mode->c_cflag = (mode->c_cflag & ~CSIZE) | CS7 | PARODD | PARENB; | 1118 | mode->c_cflag = (mode->c_cflag & ~CSIZE) | CS7 | PARODD | PARENB; |
1119 | } else if (info == &mode_info[IDX_nl]) { | 1119 | } else if (info == &mode_info[IDX_nl]) { |
1120 | if (reversed) { | 1120 | if (reversed) { |
1121 | mode->c_iflag = (mode->c_iflag | ICRNL) & ~INLCR & ~IGNCR; | 1121 | mode->c_iflag = (mode->c_iflag | ICRNL) & ~INLCR & ~IGNCR; |
1122 | mode->c_oflag = (mode->c_oflag | ONLCR) & ~OCRNL & ~ONLRET; | 1122 | mode->c_oflag = (mode->c_oflag | ONLCR) & ~OCRNL & ~ONLRET; |
1123 | } else { | 1123 | } else { |
1124 | mode->c_iflag = mode->c_iflag & ~ICRNL; | 1124 | mode->c_iflag = mode->c_iflag & ~ICRNL; |
1125 | if (ONLCR) mode->c_oflag = mode->c_oflag & ~ONLCR; | 1125 | if (ONLCR) mode->c_oflag = mode->c_oflag & ~ONLCR; |
diff --git a/coreutils/touch.c b/coreutils/touch.c index 03aac3aa2..afff36b4d 100644 --- a/coreutils/touch.c +++ b/coreutils/touch.c | |||
@@ -97,7 +97,7 @@ int touch_main(int argc UNUSED_PARAM, char **argv) | |||
97 | parse_datestr(date_str, &tm_time); | 97 | parse_datestr(date_str, &tm_time); |
98 | 98 | ||
99 | /* Correct any day of week and day of year etc. fields */ | 99 | /* Correct any day of week and day of year etc. fields */ |
100 | tm_time.tm_isdst = -1; /* Be sure to recheck dst */ | 100 | tm_time.tm_isdst = -1; /* Be sure to recheck dst */ |
101 | t = validate_tm_time(date_str, &tm_time); | 101 | t = validate_tm_time(date_str, &tm_time); |
102 | 102 | ||
103 | timebuf[1].tv_sec = timebuf[0].tv_sec = t; | 103 | timebuf[1].tv_sec = timebuf[0].tv_sec = t; |
diff --git a/coreutils/tty.c b/coreutils/tty.c index 489181319..282d9680f 100644 --- a/coreutils/tty.c +++ b/coreutils/tty.c | |||
@@ -16,10 +16,10 @@ int tty_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | |||
16 | int tty_main(int argc UNUSED_PARAM, char **argv) | 16 | int tty_main(int argc UNUSED_PARAM, char **argv) |
17 | { | 17 | { |
18 | const char *s; | 18 | const char *s; |
19 | IF_INCLUDE_SUSv2(int silent;) /* Note: No longer relevant in SUSv3. */ | 19 | IF_INCLUDE_SUSv2(int silent;) /* Note: No longer relevant in SUSv3. */ |
20 | int retval; | 20 | int retval; |
21 | 21 | ||
22 | xfunc_error_retval = 2; /* SUSv3 requires > 1 for error. */ | 22 | xfunc_error_retval = 2; /* SUSv3 requires > 1 for error. */ |
23 | 23 | ||
24 | IF_INCLUDE_SUSv2(silent = getopt32(argv, "s");) | 24 | IF_INCLUDE_SUSv2(silent = getopt32(argv, "s");) |
25 | IF_INCLUDE_SUSv2(argv += optind;) | 25 | IF_INCLUDE_SUSv2(argv += optind;) |
diff --git a/coreutils/uniq.c b/coreutils/uniq.c index 358de7894..decf7e4f8 100644 --- a/coreutils/uniq.c +++ b/coreutils/uniq.c | |||
@@ -86,7 +86,7 @@ int uniq_main(int argc UNUSED_PARAM, char **argv) | |||
86 | } | 86 | } |
87 | 87 | ||
88 | free(cur_line); | 88 | free(cur_line); |
89 | ++dups; /* testing for overflow seems excessive */ | 89 | ++dups; /* testing for overflow seems excessive */ |
90 | } | 90 | } |
91 | 91 | ||
92 | if (old_line) { | 92 | if (old_line) { |
diff --git a/e2fsprogs/old_e2fsprogs/ext2fs/bitops.c b/e2fsprogs/old_e2fsprogs/ext2fs/bitops.c index 3cf157949..3d08394d8 100644 --- a/e2fsprogs/old_e2fsprogs/ext2fs/bitops.c +++ b/e2fsprogs/old_e2fsprogs/ext2fs/bitops.c | |||
@@ -65,7 +65,7 @@ int ext2fs_test_bit(unsigned int nr, const void * addr) | |||
65 | return (mask & *ADDR); | 65 | return (mask & *ADDR); |
66 | } | 66 | } |
67 | 67 | ||
68 | #endif /* !_EXT2_HAVE_ASM_BITOPS_ */ | 68 | #endif /* !_EXT2_HAVE_ASM_BITOPS_ */ |
69 | 69 | ||
70 | void ext2fs_warn_bitmap(errcode_t errcode, unsigned long arg, | 70 | void ext2fs_warn_bitmap(errcode_t errcode, unsigned long arg, |
71 | const char *description) | 71 | const char *description) |
diff --git a/e2fsprogs/old_e2fsprogs/ext2fs/flushb.c b/e2fsprogs/old_e2fsprogs/ext2fs/flushb.c index e42982653..45ed76512 100644 --- a/e2fsprogs/old_e2fsprogs/ext2fs/flushb.c +++ b/e2fsprogs/old_e2fsprogs/ext2fs/flushb.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #endif | 23 | #endif |
24 | #if HAVE_SYS_MOUNT_H | 24 | #if HAVE_SYS_MOUNT_H |
25 | #include <sys/param.h> | 25 | #include <sys/param.h> |
26 | #include <sys/mount.h> /* This may define BLKFLSBUF */ | 26 | #include <sys/mount.h> /* This may define BLKFLSBUF */ |
27 | #endif | 27 | #endif |
28 | 28 | ||
29 | #include "ext2_fs.h" | 29 | #include "ext2_fs.h" |
@@ -38,10 +38,10 @@ | |||
38 | */ | 38 | */ |
39 | #ifdef __linux__ | 39 | #ifdef __linux__ |
40 | #ifndef BLKFLSBUF | 40 | #ifndef BLKFLSBUF |
41 | #define BLKFLSBUF _IO(0x12,97) /* flush buffer cache */ | 41 | #define BLKFLSBUF _IO(0x12,97) /* flush buffer cache */ |
42 | #endif | 42 | #endif |
43 | #ifndef FDFLUSH | 43 | #ifndef FDFLUSH |
44 | #define FDFLUSH _IO(2,0x4b) /* flush floppy disk */ | 44 | #define FDFLUSH _IO(2,0x4b) /* flush floppy disk */ |
45 | #endif | 45 | #endif |
46 | #endif | 46 | #endif |
47 | 47 | ||
diff --git a/e2fsprogs/old_e2fsprogs/ext2fs/inline.c b/e2fsprogs/old_e2fsprogs/ext2fs/inline.c index d328cc950..7457b9396 100644 --- a/e2fsprogs/old_e2fsprogs/ext2fs/inline.c +++ b/e2fsprogs/old_e2fsprogs/ext2fs/inline.c | |||
@@ -1,8 +1,8 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | 1 | /* vi: set sw=4 ts=4: */ |
2 | /* | 2 | /* |
3 | * inline.c --- Includes the inlined functions defined in the header | 3 | * inline.c --- Includes the inlined functions defined in the header |
4 | * files as standalone functions, in case the application program | 4 | * files as standalone functions, in case the application program |
5 | * is compiled with inlining turned off. | 5 | * is compiled with inlining turned off. |
6 | * | 6 | * |
7 | * Copyright (C) 1993, 1994 Theodore Ts'o. | 7 | * Copyright (C) 1993, 1994 Theodore Ts'o. |
8 | * | 8 | * |
diff --git a/e2fsprogs/old_e2fsprogs/ext2fs/ismounted.c b/e2fsprogs/old_e2fsprogs/ext2fs/ismounted.c index 7f24f9ba8..f5f6f31cd 100644 --- a/e2fsprogs/old_e2fsprogs/ext2fs/ismounted.c +++ b/e2fsprogs/old_e2fsprogs/ext2fs/ismounted.c | |||
@@ -59,7 +59,7 @@ static errcode_t check_mntent_file(const char *mtab_file, const char *file, | |||
59 | if (S_ISBLK(st_buf.st_mode)) { | 59 | if (S_ISBLK(st_buf.st_mode)) { |
60 | #ifndef __GNU__ /* The GNU hurd is broken with respect to stat devices */ | 60 | #ifndef __GNU__ /* The GNU hurd is broken with respect to stat devices */ |
61 | file_rdev = st_buf.st_rdev; | 61 | file_rdev = st_buf.st_rdev; |
62 | #endif /* __GNU__ */ | 62 | #endif /* __GNU__ */ |
63 | } else { | 63 | } else { |
64 | file_dev = st_buf.st_dev; | 64 | file_dev = st_buf.st_dev; |
65 | file_ino = st_buf.st_ino; | 65 | file_ino = st_buf.st_ino; |
@@ -73,7 +73,7 @@ static errcode_t check_mntent_file(const char *mtab_file, const char *file, | |||
73 | #ifndef __GNU__ | 73 | #ifndef __GNU__ |
74 | if (file_rdev && (file_rdev == st_buf.st_rdev)) | 74 | if (file_rdev && (file_rdev == st_buf.st_rdev)) |
75 | break; | 75 | break; |
76 | #endif /* __GNU__ */ | 76 | #endif /* __GNU__ */ |
77 | } else { | 77 | } else { |
78 | if (file_dev && ((file_dev == st_buf.st_dev) && | 78 | if (file_dev && ((file_dev == st_buf.st_dev) && |
79 | (file_ino == st_buf.st_ino))) | 79 | (file_ino == st_buf.st_ino))) |
@@ -99,7 +99,7 @@ static errcode_t check_mntent_file(const char *mtab_file, const char *file, | |||
99 | goto is_root; | 99 | goto is_root; |
100 | } | 100 | } |
101 | } | 101 | } |
102 | #endif /* __GNU__ */ | 102 | #endif /* __GNU__ */ |
103 | goto errout; | 103 | goto errout; |
104 | } | 104 | } |
105 | #ifndef __GNU__ /* The GNU hurd is deficient; what else is new? */ | 105 | #ifndef __GNU__ /* The GNU hurd is deficient; what else is new? */ |
@@ -247,7 +247,7 @@ static int is_swap_device(const char *file) | |||
247 | if ((stat(file, &st_buf) == 0) && | 247 | if ((stat(file, &st_buf) == 0) && |
248 | S_ISBLK(st_buf.st_mode)) | 248 | S_ISBLK(st_buf.st_mode)) |
249 | file_dev = st_buf.st_rdev; | 249 | file_dev = st_buf.st_rdev; |
250 | #endif /* __GNU__ */ | 250 | #endif /* __GNU__ */ |
251 | 251 | ||
252 | if (!(f = fopen_for_read("/proc/swaps"))) | 252 | if (!(f = fopen_for_read("/proc/swaps"))) |
253 | return 0; | 253 | return 0; |
@@ -271,7 +271,7 @@ static int is_swap_device(const char *file) | |||
271 | ret++; | 271 | ret++; |
272 | break; | 272 | break; |
273 | } | 273 | } |
274 | #endif /* __GNU__ */ | 274 | #endif /* __GNU__ */ |
275 | } | 275 | } |
276 | fclose(f); | 276 | fclose(f); |
277 | return ret; | 277 | return ret; |
diff --git a/e2fsprogs/old_e2fsprogs/lsattr.c b/e2fsprogs/old_e2fsprogs/lsattr.c index 294bf2f2e..9e0e4cb60 100644 --- a/e2fsprogs/old_e2fsprogs/lsattr.c +++ b/e2fsprogs/old_e2fsprogs/lsattr.c | |||
@@ -12,10 +12,10 @@ | |||
12 | 12 | ||
13 | /* | 13 | /* |
14 | * History: | 14 | * History: |
15 | * 93/10/30 - Creation | 15 | * 93/10/30 - Creation |
16 | * 93/11/13 - Replace stat() calls by lstat() to avoid loops | 16 | * 93/11/13 - Replace stat() calls by lstat() to avoid loops |
17 | * 94/02/27 - Integrated in Ted's distribution | 17 | * 94/02/27 - Integrated in Ted's distribution |
18 | * 98/12/29 - Display version info only when -V specified (G M Sipe) | 18 | * 98/12/29 - Display version info only when -V specified (G M Sipe) |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <sys/types.h> | 21 | #include <sys/types.h> |
diff --git a/e2fsprogs/tune2fs.c b/e2fsprogs/tune2fs.c index 75e4f6bcf..9daec542a 100644 --- a/e2fsprogs/tune2fs.c +++ b/e2fsprogs/tune2fs.c | |||
@@ -43,7 +43,7 @@ do { \ | |||
43 | //usage: "Adjust filesystem options on ext[23] filesystems" | 43 | //usage: "Adjust filesystem options on ext[23] filesystems" |
44 | 44 | ||
45 | enum { | 45 | enum { |
46 | OPT_L = 1 << 0, // label | 46 | OPT_L = 1 << 0, // label |
47 | OPT_c = 1 << 1, // max mount count | 47 | OPT_c = 1 << 1, // max mount count |
48 | OPT_i = 1 << 2, // check interval | 48 | OPT_i = 1 << 2, // check interval |
49 | }; | 49 | }; |
diff --git a/include/dump.h b/include/dump.h index 925270d9c..4c237ef05 100644 --- a/include/dump.h +++ b/include/dump.h | |||
@@ -45,7 +45,7 @@ typedef struct FS { /* format strings */ | |||
45 | typedef struct dumper_t { | 45 | typedef struct dumper_t { |
46 | off_t dump_skip; /* bytes to skip */ | 46 | off_t dump_skip; /* bytes to skip */ |
47 | int dump_length; /* max bytes to read */ | 47 | int dump_length; /* max bytes to read */ |
48 | smallint dump_vflag; /*enum dump_vflag_t*/ | 48 | smallint dump_vflag; /*enum dump_vflag_t*/ |
49 | FS *fshead; | 49 | FS *fshead; |
50 | } dumper_t; | 50 | } dumper_t; |
51 | 51 | ||
diff --git a/include/libbb.h b/include/libbb.h index 587a5f952..7c1db3f40 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -220,11 +220,11 @@ typedef unsigned long uoff_t; | |||
220 | 220 | ||
221 | /* Macros for min/max. */ | 221 | /* Macros for min/max. */ |
222 | #ifndef MIN | 222 | #ifndef MIN |
223 | #define MIN(a,b) (((a)<(b))?(a):(b)) | 223 | #define MIN(a,b) (((a)<(b))?(a):(b)) |
224 | #endif | 224 | #endif |
225 | 225 | ||
226 | #ifndef MAX | 226 | #ifndef MAX |
227 | #define MAX(a,b) (((a)>(b))?(a):(b)) | 227 | #define MAX(a,b) (((a)>(b))?(a):(b)) |
228 | #endif | 228 | #endif |
229 | 229 | ||
230 | /* buffer allocation schemes */ | 230 | /* buffer allocation schemes */ |
diff --git a/include/platform.h b/include/platform.h index 656327641..855cb289c 100644 --- a/include/platform.h +++ b/include/platform.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 5 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
6 | */ | 6 | */ |
7 | #ifndef BB_PLATFORM_H | 7 | #ifndef BB_PLATFORM_H |
8 | #define BB_PLATFORM_H 1 | 8 | #define BB_PLATFORM_H 1 |
9 | 9 | ||
10 | /* Assume all these functions exist by default. Platforms where it is not | 10 | /* Assume all these functions exist by default. Platforms where it is not |
diff --git a/init/mesg.c b/init/mesg.c index b560df205..b6fd070e1 100644 --- a/init/mesg.c +++ b/init/mesg.c | |||
@@ -28,9 +28,9 @@ | |||
28 | #include "libbb.h" | 28 | #include "libbb.h" |
29 | 29 | ||
30 | #ifdef USE_TTY_GROUP | 30 | #ifdef USE_TTY_GROUP |
31 | #define S_IWGRP_OR_S_IWOTH S_IWGRP | 31 | #define S_IWGRP_OR_S_IWOTH S_IWGRP |
32 | #else | 32 | #else |
33 | #define S_IWGRP_OR_S_IWOTH (S_IWGRP | S_IWOTH) | 33 | #define S_IWGRP_OR_S_IWOTH (S_IWGRP | S_IWOTH) |
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | int mesg_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 36 | int mesg_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
diff --git a/libbb/dump.c b/libbb/dump.c index 4db3f06f0..1b1d03a66 100644 --- a/libbb/dump.c +++ b/libbb/dump.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * based on code from util-linux v 2.11l | 4 | * based on code from util-linux v 2.11l |
5 | * | 5 | * |
6 | * Copyright (c) 1989 | 6 | * Copyright (c) 1989 |
7 | * The Regents of the University of California. All rights reserved. | 7 | * The Regents of the University of California. All rights reserved. |
8 | * | 8 | * |
9 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 9 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
10 | * | 10 | * |
@@ -208,7 +208,7 @@ static NOINLINE void rewrite(priv_dumper_t *dumper, FS *fs) | |||
208 | pr->bcnt = fu->bcnt; | 208 | pr->bcnt = fu->bcnt; |
209 | } else if (sokay == USEPREC) { | 209 | } else if (sokay == USEPREC) { |
210 | pr->bcnt = prec; | 210 | pr->bcnt = prec; |
211 | } else { /* NOTOKAY */ | 211 | } else { /* NOTOKAY */ |
212 | bb_error_msg_and_die("%%s requires a precision or a byte count"); | 212 | bb_error_msg_and_die("%%s requires a precision or a byte count"); |
213 | } | 213 | } |
214 | } else if (*p1 == '_') { | 214 | } else if (*p1 == '_') { |
@@ -467,7 +467,7 @@ static void bpad(PR *pr) | |||
467 | 467 | ||
468 | static const char conv_str[] ALIGN1 = | 468 | static const char conv_str[] ALIGN1 = |
469 | "\0\\0\0" | 469 | "\0\\0\0" |
470 | "\007\\a\0" /* \a */ | 470 | "\007\\a\0" /* \a */ |
471 | "\b\\b\0" | 471 | "\b\\b\0" |
472 | "\f\\b\0" | 472 | "\f\\b\0" |
473 | "\n\\n\0" | 473 | "\n\\n\0" |
diff --git a/libbb/full_write.c b/libbb/full_write.c index a2abaee25..777fbd910 100644 --- a/libbb/full_write.c +++ b/libbb/full_write.c | |||
@@ -30,7 +30,7 @@ ssize_t FAST_FUNC full_write(int fd, const void *buf, size_t len) | |||
30 | /* user can do another write to know the error code */ | 30 | /* user can do another write to know the error code */ |
31 | return total; | 31 | return total; |
32 | } | 32 | } |
33 | return cc; /* write() returns -1 on failure. */ | 33 | return cc; /* write() returns -1 on failure. */ |
34 | } | 34 | } |
35 | 35 | ||
36 | total += cc; | 36 | total += cc; |
diff --git a/libbb/human_readable.c b/libbb/human_readable.c index 50cbe41bb..8b22b0cb5 100644 --- a/libbb/human_readable.c +++ b/libbb/human_readable.c | |||
@@ -53,8 +53,8 @@ const char* FAST_FUNC make_human_readable_str(unsigned long long val, | |||
53 | u = unit_chars; | 53 | u = unit_chars; |
54 | 54 | ||
55 | if (display_unit) { | 55 | if (display_unit) { |
56 | val += display_unit/2; /* Deal with rounding */ | 56 | val += display_unit/2; /* Deal with rounding */ |
57 | val /= display_unit; /* Don't combine with the line above! */ | 57 | val /= display_unit; /* Don't combine with the line above! */ |
58 | /* will just print it as ulonglong (below) */ | 58 | /* will just print it as ulonglong (below) */ |
59 | } else { | 59 | } else { |
60 | while ((val >= 1024) | 60 | while ((val >= 1024) |
diff --git a/libbb/inet_common.c b/libbb/inet_common.c index e031ddf9b..6f585ebd9 100644 --- a/libbb/inet_common.c +++ b/libbb/inet_common.c | |||
@@ -218,4 +218,4 @@ char* FAST_FUNC INET6_rresolve(struct sockaddr_in6 *sin6, int numeric) | |||
218 | return xstrdup(name); | 218 | return xstrdup(name); |
219 | } | 219 | } |
220 | 220 | ||
221 | #endif /* CONFIG_FEATURE_IPV6 */ | 221 | #endif /* CONFIG_FEATURE_IPV6 */ |
diff --git a/libbb/inode_hash.c b/libbb/inode_hash.c index 2aea08b04..715535ef5 100644 --- a/libbb/inode_hash.c +++ b/libbb/inode_hash.c | |||
@@ -17,8 +17,8 @@ typedef struct ino_dev_hash_bucket_struct { | |||
17 | char name[1]; | 17 | char name[1]; |
18 | } ino_dev_hashtable_bucket_t; | 18 | } ino_dev_hashtable_bucket_t; |
19 | 19 | ||
20 | #define HASH_SIZE 311 /* Should be prime */ | 20 | #define HASH_SIZE 311 /* Should be prime */ |
21 | #define hash_inode(i) ((i) % HASH_SIZE) | 21 | #define hash_inode(i) ((i) % HASH_SIZE) |
22 | 22 | ||
23 | /* array of [HASH_SIZE] elements */ | 23 | /* array of [HASH_SIZE] elements */ |
24 | static ino_dev_hashtable_bucket_t **ino_dev_hashtable; | 24 | static ino_dev_hashtable_bucket_t **ino_dev_hashtable; |
diff --git a/libbb/login.c b/libbb/login.c index aa2e17164..8a82c6add 100644 --- a/libbb/login.c +++ b/libbb/login.c | |||
@@ -30,7 +30,7 @@ void FAST_FUNC print_login_issue(const char *issue_file, const char *tty) | |||
30 | time(&t); | 30 | time(&t); |
31 | uname(&uts); | 31 | uname(&uts); |
32 | 32 | ||
33 | puts("\r"); /* start a new line */ | 33 | puts("\r"); /* start a new line */ |
34 | 34 | ||
35 | fp = fopen_for_read(issue_file); | 35 | fp = fopen_for_read(issue_file); |
36 | if (!fp) | 36 | if (!fp) |
diff --git a/libbb/make_directory.c b/libbb/make_directory.c index 1350e8bd9..72303e7a3 100644 --- a/libbb/make_directory.c +++ b/libbb/make_directory.c | |||
@@ -44,7 +44,7 @@ int FAST_FUNC bb_make_directory(char *path, long mode, int flags) | |||
44 | while (1) { | 44 | while (1) { |
45 | c = '\0'; | 45 | c = '\0'; |
46 | 46 | ||
47 | if (flags & FILEUTILS_RECUR) { /* Get the parent */ | 47 | if (flags & FILEUTILS_RECUR) { /* Get the parent */ |
48 | /* Bypass leading non-'/'s and then subsequent '/'s */ | 48 | /* Bypass leading non-'/'s and then subsequent '/'s */ |
49 | while (*s) { | 49 | while (*s) { |
50 | if (*s == '/') { | 50 | if (*s == '/') { |
diff --git a/libbb/parse_config.c b/libbb/parse_config.c index 9dbfaf5d7..d471edbee 100644 --- a/libbb/parse_config.c +++ b/libbb/parse_config.c | |||
@@ -45,7 +45,7 @@ int parse_main(int argc UNUSED_PARAM, char **argv) | |||
45 | Typical usage: | 45 | Typical usage: |
46 | 46 | ||
47 | ----- CUT ----- | 47 | ----- CUT ----- |
48 | char *t[3]; // tokens placeholder | 48 | char *t[3]; // tokens placeholder |
49 | parser_t *p = config_open(filename); | 49 | parser_t *p = config_open(filename); |
50 | if (p) { | 50 | if (p) { |
51 | // parse line-by-line | 51 | // parse line-by-line |
diff --git a/libbb/parse_mode.c b/libbb/parse_mode.c index 8ea89163c..5a4e1c579 100644 --- a/libbb/parse_mode.c +++ b/libbb/parse_mode.c | |||
@@ -57,8 +57,8 @@ int FAST_FUNC bb_parse_mode(const char *s, mode_t *current_mode) | |||
57 | /* Note: we allow empty clauses, and hence empty modes. | 57 | /* Note: we allow empty clauses, and hence empty modes. |
58 | * We treat an empty mode as no change to perms. */ | 58 | * We treat an empty mode as no change to perms. */ |
59 | 59 | ||
60 | while (*s) { /* Process clauses. */ | 60 | while (*s) { /* Process clauses. */ |
61 | if (*s == ',') { /* We allow empty clauses. */ | 61 | if (*s == ',') { /* We allow empty clauses. */ |
62 | ++s; | 62 | ++s; |
63 | continue; | 63 | continue; |
64 | } | 64 | } |
@@ -77,7 +77,7 @@ int FAST_FUNC bb_parse_mode(const char *s, mode_t *current_mode) | |||
77 | } | 77 | } |
78 | } while (*++p); | 78 | } while (*++p); |
79 | 79 | ||
80 | do { /* Process action list. */ | 80 | do { /* Process action list. */ |
81 | if ((*s != '+') && (*s != '-')) { | 81 | if ((*s != '+') && (*s != '-')) { |
82 | if (*s != '=') { | 82 | if (*s != '=') { |
83 | return 0; | 83 | return 0; |
@@ -93,7 +93,7 @@ int FAST_FUNC bb_parse_mode(const char *s, mode_t *current_mode) | |||
93 | op = *s++; | 93 | op = *s++; |
94 | 94 | ||
95 | /* Check for permcopy. */ | 95 | /* Check for permcopy. */ |
96 | p = who_chars + 1; /* Skip 'a' entry. */ | 96 | p = who_chars + 1; /* Skip 'a' entry. */ |
97 | do { | 97 | do { |
98 | if (*p == *s) { | 98 | if (*p == *s) { |
99 | int i = 0; | 99 | int i = 0; |
@@ -128,7 +128,7 @@ int FAST_FUNC bb_parse_mode(const char *s, mode_t *current_mode) | |||
128 | } | 128 | } |
129 | } while (*++p); | 129 | } while (*++p); |
130 | GOT_ACTION: | 130 | GOT_ACTION: |
131 | if (permlist) { /* The permlist was nonempty. */ | 131 | if (permlist) { /* The permlist was nonempty. */ |
132 | mode_t tmp = wholist; | 132 | mode_t tmp = wholist; |
133 | if (!wholist) { | 133 | if (!wholist) { |
134 | mode_t u_mask = umask(0); | 134 | mode_t u_mask = umask(0); |
diff --git a/libbb/progress.c b/libbb/progress.c index f53271398..4c2763c53 100644 --- a/libbb/progress.c +++ b/libbb/progress.c | |||
@@ -7,7 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | /*- | 8 | /*- |
9 | * Copyright (c) 1992, 1993 | 9 | * Copyright (c) 1992, 1993 |
10 | * The Regents of the University of California. All rights reserved. | 10 | * The Regents of the University of California. All rights reserved. |
11 | * | 11 | * |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without |
13 | * modification, are permitted provided that the following conditions | 13 | * modification, are permitted provided that the following conditions |
@@ -18,8 +18,8 @@ | |||
18 | * notice, this list of conditions and the following disclaimer in the | 18 | * notice, this list of conditions and the following disclaimer in the |
19 | * documentation and/or other materials provided with the distribution. | 19 | * documentation and/or other materials provided with the distribution. |
20 | * | 20 | * |
21 | * 3. <BSD Advertising Clause omitted per the July 22, 1999 licensing change | 21 | * 3. BSD Advertising Clause omitted per the July 22, 1999 licensing change |
22 | * ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change> | 22 | * ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change |
23 | * | 23 | * |
24 | * 4. Neither the name of the University nor the names of its contributors | 24 | * 4. Neither the name of the University nor the names of its contributors |
25 | * may be used to endorse or promote products derived from this software | 25 | * may be used to endorse or promote products derived from this software |
diff --git a/libbb/speed_table.c b/libbb/speed_table.c index 6f95c54e6..45159f1f3 100644 --- a/libbb/speed_table.c +++ b/libbb/speed_table.c | |||
@@ -29,12 +29,12 @@ static const struct speed_map speeds[] = { | |||
29 | {B2400, 2400}, | 29 | {B2400, 2400}, |
30 | {B4800, 4800}, | 30 | {B4800, 4800}, |
31 | {B9600, 9600}, | 31 | {B9600, 9600}, |
32 | #ifdef B19200 | 32 | #ifdef B19200 |
33 | {B19200, 19200}, | 33 | {B19200, 19200}, |
34 | #elif defined(EXTA) | 34 | #elif defined(EXTA) |
35 | {EXTA, 19200}, | 35 | {EXTA, 19200}, |
36 | #endif | 36 | #endif |
37 | #ifdef B38400 | 37 | #ifdef B38400 |
38 | {B38400, 38400/256 + 0x8000U}, | 38 | {B38400, 38400/256 + 0x8000U}, |
39 | #elif defined(EXTB) | 39 | #elif defined(EXTB) |
40 | {EXTB, 38400/256 + 0x8000U}, | 40 | {EXTB, 38400/256 + 0x8000U}, |
diff --git a/libbb/update_passwd.c b/libbb/update_passwd.c index a2be0f155..dc5029223 100644 --- a/libbb/update_passwd.c +++ b/libbb/update_passwd.c | |||
@@ -22,7 +22,7 @@ static void check_selinux_update_passwd(const char *username) | |||
22 | char *seuser; | 22 | char *seuser; |
23 | 23 | ||
24 | if (getuid() != (uid_t)0 || is_selinux_enabled() == 0) | 24 | if (getuid() != (uid_t)0 || is_selinux_enabled() == 0) |
25 | return; /* No need to check */ | 25 | return; /* No need to check */ |
26 | 26 | ||
27 | if (getprevcon_raw(&context) < 0) | 27 | if (getprevcon_raw(&context) < 0) |
28 | bb_perror_msg_and_die("getprevcon failed"); | 28 | bb_perror_msg_and_die("getprevcon failed"); |
diff --git a/libbb/wfopen_input.c b/libbb/wfopen_input.c index 422a58ecf..d8b1c4a36 100644 --- a/libbb/wfopen_input.c +++ b/libbb/wfopen_input.c | |||
@@ -31,7 +31,7 @@ FILE* FAST_FUNC xfopen_stdin(const char *filename) | |||
31 | FILE *fp = fopen_or_warn_stdin(filename); | 31 | FILE *fp = fopen_or_warn_stdin(filename); |
32 | if (fp) | 32 | if (fp) |
33 | return fp; | 33 | return fp; |
34 | xfunc_die(); /* We already output an error message. */ | 34 | xfunc_die(); /* We already output an error message. */ |
35 | } | 35 | } |
36 | 36 | ||
37 | int FAST_FUNC open_or_warn_stdin(const char *filename) | 37 | int FAST_FUNC open_or_warn_stdin(const char *filename) |
@@ -52,5 +52,5 @@ int FAST_FUNC xopen_stdin(const char *filename) | |||
52 | int fd = open_or_warn_stdin(filename); | 52 | int fd = open_or_warn_stdin(filename); |
53 | if (fd >= 0) | 53 | if (fd >= 0) |
54 | return fd; | 54 | return fd; |
55 | xfunc_die(); /* We already output an error message. */ | 55 | xfunc_die(); /* We already output an error message. */ |
56 | } | 56 | } |
diff --git a/libbb/xatonum_template.c b/libbb/xatonum_template.c index f67b50710..029f66202 100644 --- a/libbb/xatonum_template.c +++ b/libbb/xatonum_template.c | |||
@@ -41,7 +41,7 @@ unsigned type FAST_FUNC xstrtou(_range_sfx)(const char *numstr, int base, | |||
41 | if (errno || numstr == e) | 41 | if (errno || numstr == e) |
42 | goto inval; /* error / no digits / illegal trailing chars */ | 42 | goto inval; /* error / no digits / illegal trailing chars */ |
43 | 43 | ||
44 | errno = old_errno; /* Ok. So restore errno. */ | 44 | errno = old_errno; /* Ok. So restore errno. */ |
45 | 45 | ||
46 | /* Do optional suffix parsing. Allow 'empty' suffix tables. | 46 | /* Do optional suffix parsing. Allow 'empty' suffix tables. |
47 | * Note that we also allow nul suffixes with associated multipliers, | 47 | * Note that we also allow nul suffixes with associated multipliers, |
diff --git a/libbb/xgetcwd.c b/libbb/xgetcwd.c index 97367217e..71720d323 100644 --- a/libbb/xgetcwd.c +++ b/libbb/xgetcwd.c | |||
@@ -24,7 +24,7 @@ xrealloc_getcwd_or_warn(char *cwd) | |||
24 | char *ret; | 24 | char *ret; |
25 | unsigned path_max; | 25 | unsigned path_max; |
26 | 26 | ||
27 | path_max = 128; /* 128 + 64 should be enough for 99% of cases */ | 27 | path_max = 128; /* 128 + 64 should be enough for 99% of cases */ |
28 | 28 | ||
29 | while (1) { | 29 | while (1) { |
30 | path_max += PATH_INCR; | 30 | path_max += PATH_INCR; |
diff --git a/libpwdgrp/pwd_grp.c b/libpwdgrp/pwd_grp.c index 06f3607a0..abb6f189a 100644 --- a/libpwdgrp/pwd_grp.c +++ b/libpwdgrp/pwd_grp.c | |||
@@ -21,13 +21,13 @@ | |||
21 | #include <assert.h> | 21 | #include <assert.h> |
22 | 22 | ||
23 | #ifndef _PATH_SHADOW | 23 | #ifndef _PATH_SHADOW |
24 | #define _PATH_SHADOW "/etc/shadow" | 24 | #define _PATH_SHADOW "/etc/shadow" |
25 | #endif | 25 | #endif |
26 | #ifndef _PATH_PASSWD | 26 | #ifndef _PATH_PASSWD |
27 | #define _PATH_PASSWD "/etc/passwd" | 27 | #define _PATH_PASSWD "/etc/passwd" |
28 | #endif | 28 | #endif |
29 | #ifndef _PATH_GROUP | 29 | #ifndef _PATH_GROUP |
30 | #define _PATH_GROUP "/etc/group" | 30 | #define _PATH_GROUP "/etc/group" |
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | /**********************************************************************/ | 33 | /**********************************************************************/ |
diff --git a/loginutils/chpasswd.c b/loginutils/chpasswd.c index 101920c03..48cf9b130 100644 --- a/loginutils/chpasswd.c +++ b/loginutils/chpasswd.c | |||
@@ -14,8 +14,8 @@ static const char chpasswd_longopts[] ALIGN1 = | |||
14 | ; | 14 | ; |
15 | #endif | 15 | #endif |
16 | 16 | ||
17 | #define OPT_ENC 1 | 17 | #define OPT_ENC 1 |
18 | #define OPT_MD5 2 | 18 | #define OPT_MD5 2 |
19 | 19 | ||
20 | int chpasswd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 20 | int chpasswd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
21 | int chpasswd_main(int argc UNUSED_PARAM, char **argv) | 21 | int chpasswd_main(int argc UNUSED_PARAM, char **argv) |
diff --git a/loginutils/cryptpw.c b/loginutils/cryptpw.c index f32cbceb9..6c801f9fa 100644 --- a/loginutils/cryptpw.c +++ b/loginutils/cryptpw.c | |||
@@ -104,7 +104,7 @@ int cryptpw_main(int argc UNUSED_PARAM, char **argv) | |||
104 | xmove_fd(fd, STDIN_FILENO); | 104 | xmove_fd(fd, STDIN_FILENO); |
105 | 105 | ||
106 | puts(pw_encrypt( | 106 | puts(pw_encrypt( |
107 | argv[0] ? argv[0] : ( | 107 | argv[0] ? argv[0] : ( |
108 | /* Only mkpasswd, and only from tty, prompts. | 108 | /* Only mkpasswd, and only from tty, prompts. |
109 | * Otherwise it is a plain read. */ | 109 | * Otherwise it is a plain read. */ |
110 | (isatty(STDIN_FILENO) && applet_name[0] == 'm') | 110 | (isatty(STDIN_FILENO) && applet_name[0] == 'm') |
diff --git a/loginutils/getty.c b/loginutils/getty.c index ab55ea4b0..76b0de449 100644 --- a/loginutils/getty.c +++ b/loginutils/getty.c | |||
@@ -387,7 +387,7 @@ static char *get_logname(char *logname, unsigned size_logname, | |||
387 | struct options *op, struct chardata *cp) | 387 | struct options *op, struct chardata *cp) |
388 | { | 388 | { |
389 | char *bp; | 389 | char *bp; |
390 | char c; /* input character, full eight bits */ | 390 | char c; /* input character, full eight bits */ |
391 | char ascval; /* low 7 bits of input character */ | 391 | char ascval; /* low 7 bits of input character */ |
392 | int bits; /* # of "1" bits per character */ | 392 | int bits; /* # of "1" bits per character */ |
393 | int mask; /* mask with 1 bit up */ | 393 | int mask; /* mask with 1 bit up */ |
@@ -580,7 +580,7 @@ int getty_main(int argc UNUSED_PARAM, char **argv) | |||
580 | chardata = init_chardata; | 580 | chardata = init_chardata; |
581 | 581 | ||
582 | memset(&options, 0, sizeof(options)); | 582 | memset(&options, 0, sizeof(options)); |
583 | options.login = _PATH_LOGIN; /* default login program */ | 583 | options.login = _PATH_LOGIN; /* default login program */ |
584 | options.tty = "tty1"; /* default tty line */ | 584 | options.tty = "tty1"; /* default tty line */ |
585 | options.initstring = ""; /* modem init string */ | 585 | options.initstring = ""; /* modem init string */ |
586 | #ifdef ISSUE | 586 | #ifdef ISSUE |
diff --git a/loginutils/login.c b/loginutils/login.c index 3065eaa5b..9a624df9a 100644 --- a/loginutils/login.c +++ b/loginutils/login.c | |||
@@ -124,7 +124,7 @@ static void run_login_script(struct passwd *pw, char *full_tty) | |||
124 | xsetenv("LOGIN_UID", utoa(pw->pw_uid)); | 124 | xsetenv("LOGIN_UID", utoa(pw->pw_uid)); |
125 | xsetenv("LOGIN_GID", utoa(pw->pw_gid)); | 125 | xsetenv("LOGIN_GID", utoa(pw->pw_gid)); |
126 | xsetenv("LOGIN_SHELL", pw->pw_shell); | 126 | xsetenv("LOGIN_SHELL", pw->pw_shell); |
127 | spawn_and_wait(t_argv); /* NOMMU-friendly */ | 127 | spawn_and_wait(t_argv); /* NOMMU-friendly */ |
128 | unsetenv("LOGIN_TTY"); | 128 | unsetenv("LOGIN_TTY"); |
129 | unsetenv("LOGIN_USER"); | 129 | unsetenv("LOGIN_USER"); |
130 | unsetenv("LOGIN_UID"); | 130 | unsetenv("LOGIN_UID"); |
@@ -245,7 +245,7 @@ int login_main(int argc UNUSED_PARAM, char **argv) | |||
245 | 245 | ||
246 | /* Let's find out and memorize our tty */ | 246 | /* Let's find out and memorize our tty */ |
247 | if (!isatty(STDIN_FILENO) || !isatty(STDOUT_FILENO) || !isatty(STDERR_FILENO)) | 247 | if (!isatty(STDIN_FILENO) || !isatty(STDOUT_FILENO) || !isatty(STDERR_FILENO)) |
248 | return EXIT_FAILURE; /* Must be a terminal */ | 248 | return EXIT_FAILURE; /* Must be a terminal */ |
249 | full_tty = xmalloc_ttyname(STDIN_FILENO); | 249 | full_tty = xmalloc_ttyname(STDIN_FILENO); |
250 | if (!full_tty) | 250 | if (!full_tty) |
251 | full_tty = xstrdup("UNKNOWN"); | 251 | full_tty = xstrdup("UNKNOWN"); |
diff --git a/miscutils/chat.c b/miscutils/chat.c index 2040c3f6a..8b151fda4 100644 --- a/miscutils/chat.c +++ b/miscutils/chat.c | |||
@@ -10,7 +10,7 @@ | |||
10 | #include "libbb.h" | 10 | #include "libbb.h" |
11 | 11 | ||
12 | // default timeout: 45 sec | 12 | // default timeout: 45 sec |
13 | #define DEFAULT_CHAT_TIMEOUT 45*1000 | 13 | #define DEFAULT_CHAT_TIMEOUT 45*1000 |
14 | // max length of "abort string", | 14 | // max length of "abort string", |
15 | // i.e. device reply which causes termination | 15 | // i.e. device reply which causes termination |
16 | #define MAX_ABORT_LEN 50 | 16 | #define MAX_ABORT_LEN 50 |
diff --git a/miscutils/crond.c b/miscutils/crond.c index 7f2d54c9f..5bf053609 100644 --- a/miscutils/crond.c +++ b/miscutils/crond.c | |||
@@ -35,7 +35,7 @@ | |||
35 | # define CRONUPDATE "cron.update" | 35 | # define CRONUPDATE "cron.update" |
36 | #endif | 36 | #endif |
37 | #ifndef MAXLINES | 37 | #ifndef MAXLINES |
38 | # define MAXLINES 256 /* max lines in non-root crontabs */ | 38 | # define MAXLINES 256 /* max lines in non-root crontabs */ |
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | 41 | ||
@@ -170,7 +170,7 @@ static void ParseField(char *user, char *ary, int modvalue, int off, | |||
170 | 170 | ||
171 | /* Handle numeric digit or symbol or '*' */ | 171 | /* Handle numeric digit or symbol or '*' */ |
172 | if (*ptr == '*') { | 172 | if (*ptr == '*') { |
173 | n1 = 0; /* everything will be filled */ | 173 | n1 = 0; /* everything will be filled */ |
174 | n2 = modvalue - 1; | 174 | n2 = modvalue - 1; |
175 | skip = 1; | 175 | skip = 1; |
176 | ++ptr; | 176 | ++ptr; |
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c index 8f19288cc..35e431951 100644 --- a/miscutils/devfsd.c +++ b/miscutils/devfsd.c | |||
@@ -75,7 +75,7 @@ | |||
75 | 75 | ||
76 | /* Various defines taken from linux/devfs_fs.h */ | 76 | /* Various defines taken from linux/devfs_fs.h */ |
77 | #define DEVFSD_PROTOCOL_REVISION_KERNEL 5 | 77 | #define DEVFSD_PROTOCOL_REVISION_KERNEL 5 |
78 | #define DEVFSD_IOCTL_BASE 'd' | 78 | #define DEVFSD_IOCTL_BASE 'd' |
79 | /* These are the various ioctls */ | 79 | /* These are the various ioctls */ |
80 | #define DEVFSDIOC_GET_PROTO_REV _IOR(DEVFSD_IOCTL_BASE, 0, int) | 80 | #define DEVFSDIOC_GET_PROTO_REV _IOR(DEVFSD_IOCTL_BASE, 0, int) |
81 | #define DEVFSDIOC_SET_EVENT_MASK _IOW(DEVFSD_IOCTL_BASE, 2, int) | 81 | #define DEVFSDIOC_SET_EVENT_MASK _IOW(DEVFSD_IOCTL_BASE, 2, int) |
diff --git a/miscutils/flash_eraseall.c b/miscutils/flash_eraseall.c index b832cc1dd..68596e11b 100644 --- a/miscutils/flash_eraseall.c +++ b/miscutils/flash_eraseall.c | |||
@@ -14,10 +14,10 @@ | |||
14 | #include <mtd/mtd-user.h> | 14 | #include <mtd/mtd-user.h> |
15 | #include <linux/jffs2.h> | 15 | #include <linux/jffs2.h> |
16 | 16 | ||
17 | #define OPTION_J (1 << 0) | 17 | #define OPTION_J (1 << 0) |
18 | #define OPTION_Q (1 << 1) | 18 | #define OPTION_Q (1 << 1) |
19 | #define IS_NAND (1 << 2) | 19 | #define IS_NAND (1 << 2) |
20 | #define BBTEST (1 << 3) | 20 | #define BBTEST (1 << 3) |
21 | 21 | ||
22 | /* mtd/jffs2-user.h used to have this atrocity: | 22 | /* mtd/jffs2-user.h used to have this atrocity: |
23 | extern int target_endian; | 23 | extern int target_endian; |
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c index d946c7165..38b265d60 100644 --- a/miscutils/hdparm.c +++ b/miscutils/hdparm.c | |||
@@ -1745,7 +1745,7 @@ static void process_dev(char *devname) | |||
1745 | if (-1 == read(fd, buf, sizeof(buf))) | 1745 | if (-1 == read(fd, buf, sizeof(buf))) |
1746 | bb_perror_msg("read of 512 bytes failed"); | 1746 | bb_perror_msg("read of 512 bytes failed"); |
1747 | } | 1747 | } |
1748 | #endif /* HDIO_DRIVE_CMD */ | 1748 | #endif /* HDIO_DRIVE_CMD */ |
1749 | if (getset_mult || get_identity) { | 1749 | if (getset_mult || get_identity) { |
1750 | multcount = -1; | 1750 | multcount = -1; |
1751 | if (ioctl(fd, HDIO_GET_MULTCOUNT, &multcount)) { | 1751 | if (ioctl(fd, HDIO_GET_MULTCOUNT, &multcount)) { |
diff --git a/miscutils/last.c b/miscutils/last.c index 888a0a3d1..fec5b70a8 100644 --- a/miscutils/last.c +++ b/miscutils/last.c | |||
@@ -46,14 +46,14 @@ int last_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | |||
46 | static const char _ut_lin[] ALIGN1 = | 46 | static const char _ut_lin[] ALIGN1 = |
47 | "~\0" "{\0" "|\0" /* "LOGIN\0" "date\0" */; | 47 | "~\0" "{\0" "|\0" /* "LOGIN\0" "date\0" */; |
48 | enum { | 48 | enum { |
49 | TYPE_RUN_LVL = RUN_LVL, /* 1 */ | 49 | TYPE_RUN_LVL = RUN_LVL, /* 1 */ |
50 | TYPE_BOOT_TIME = BOOT_TIME, /* 2 */ | 50 | TYPE_BOOT_TIME = BOOT_TIME, /* 2 */ |
51 | TYPE_SHUTDOWN_TIME = SHUTDOWN_TIME | 51 | TYPE_SHUTDOWN_TIME = SHUTDOWN_TIME |
52 | }; | 52 | }; |
53 | enum { | 53 | enum { |
54 | _TILDE = EMPTY, /* 0 */ | 54 | _TILDE = EMPTY, /* 0 */ |
55 | TYPE_NEW_TIME, /* NEW_TIME, 3 */ | 55 | TYPE_NEW_TIME, /* NEW_TIME, 3 */ |
56 | TYPE_OLD_TIME /* OLD_TIME, 4 */ | 56 | TYPE_OLD_TIME /* OLD_TIME, 4 */ |
57 | }; | 57 | }; |
58 | 58 | ||
59 | if (argv[1]) { | 59 | if (argv[1]) { |
diff --git a/miscutils/less.c b/miscutils/less.c index d737e4cba..500059d2a 100644 --- a/miscutils/less.c +++ b/miscutils/less.c | |||
@@ -21,7 +21,7 @@ | |||
21 | * redirected input has been read from stdin | 21 | * redirected input has been read from stdin |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <sched.h> /* sched_yield() */ | 24 | #include <sched.h> /* sched_yield() */ |
25 | 25 | ||
26 | #include "libbb.h" | 26 | #include "libbb.h" |
27 | #if ENABLE_FEATURE_LESS_REGEXP | 27 | #if ENABLE_FEATURE_LESS_REGEXP |
@@ -477,7 +477,7 @@ static void m_status_print(void) | |||
477 | { | 477 | { |
478 | int percentage; | 478 | int percentage; |
479 | 479 | ||
480 | if (less_gets_pos >= 0) /* don't touch statusline while input is done! */ | 480 | if (less_gets_pos >= 0) /* don't touch statusline while input is done! */ |
481 | return; | 481 | return; |
482 | 482 | ||
483 | clear_line(); | 483 | clear_line(); |
@@ -503,7 +503,7 @@ static void status_print(void) | |||
503 | { | 503 | { |
504 | const char *p; | 504 | const char *p; |
505 | 505 | ||
506 | if (less_gets_pos >= 0) /* don't touch statusline while input is done! */ | 506 | if (less_gets_pos >= 0) /* don't touch statusline while input is done! */ |
507 | return; | 507 | return; |
508 | 508 | ||
509 | /* Change the status if flags have been set */ | 509 | /* Change the status if flags have been set */ |
diff --git a/miscutils/makedevs.c b/miscutils/makedevs.c index bba7fa61d..e74c47c35 100644 --- a/miscutils/makedevs.c +++ b/miscutils/makedevs.c | |||
@@ -121,7 +121,7 @@ int makedevs_main(int argc UNUSED_PARAM, char **argv) | |||
121 | 121 | ||
122 | if ((2 > sscanf(line, "%40s %c %o %40s %40s %u %u %u %u %u", | 122 | if ((2 > sscanf(line, "%40s %c %o %40s %40s %u %u %u %u %u", |
123 | name, &type, &mode, user, group, | 123 | name, &type, &mode, user, group, |
124 | &major, &minor, &start, &increment, &count)) | 124 | &major, &minor, &start, &increment, &count)) |
125 | || ((unsigned)(major | minor | start | count | increment) > 255) | 125 | || ((unsigned)(major | minor | start | count | increment) > 255) |
126 | ) { | 126 | ) { |
127 | bb_error_msg("invalid line %d: '%s'", linenum, line); | 127 | bb_error_msg("invalid line %d: '%s'", linenum, line); |
diff --git a/miscutils/mt.c b/miscutils/mt.c index d19866a5f..142901bb0 100644 --- a/miscutils/mt.c +++ b/miscutils/mt.c | |||
@@ -108,7 +108,7 @@ int mt_main(int argc UNUSED_PARAM, char **argv) | |||
108 | if (argv[2]) | 108 | if (argv[2]) |
109 | op.mt_count = xatoi_positive(argv[2]); | 109 | op.mt_count = xatoi_positive(argv[2]); |
110 | else | 110 | else |
111 | op.mt_count = 1; /* One, not zero, right? */ | 111 | op.mt_count = 1; /* One, not zero, right? */ |
112 | 112 | ||
113 | switch (opcode_value[idx]) { | 113 | switch (opcode_value[idx]) { |
114 | case MTWEOF: | 114 | case MTWEOF: |
diff --git a/miscutils/nandwrite.c b/miscutils/nandwrite.c index de30a0c1f..831d2f76b 100644 --- a/miscutils/nandwrite.c +++ b/miscutils/nandwrite.c | |||
@@ -53,12 +53,12 @@ | |||
53 | #define IS_NANDDUMP (ENABLE_NANDDUMP && (!ENABLE_NANDWRITE || (applet_name[4] == 'd'))) | 53 | #define IS_NANDDUMP (ENABLE_NANDDUMP && (!ENABLE_NANDWRITE || (applet_name[4] == 'd'))) |
54 | #define IS_NANDWRITE (ENABLE_NANDWRITE && (!ENABLE_NANDDUMP || (applet_name[4] != 'd'))) | 54 | #define IS_NANDWRITE (ENABLE_NANDWRITE && (!ENABLE_NANDDUMP || (applet_name[4] != 'd'))) |
55 | 55 | ||
56 | #define OPT_p (1 << 0) /* nandwrite only */ | 56 | #define OPT_p (1 << 0) /* nandwrite only */ |
57 | #define OPT_o (1 << 0) /* nanddump only */ | 57 | #define OPT_o (1 << 0) /* nanddump only */ |
58 | #define OPT_s (1 << 1) | 58 | #define OPT_s (1 << 1) |
59 | #define OPT_b (1 << 2) | 59 | #define OPT_b (1 << 2) |
60 | #define OPT_f (1 << 3) | 60 | #define OPT_f (1 << 3) |
61 | #define OPT_l (1 << 4) | 61 | #define OPT_l (1 << 4) |
62 | 62 | ||
63 | /* helper for writing out 0xff for bad blocks pad */ | 63 | /* helper for writing out 0xff for bad blocks pad */ |
64 | static void dump_bad(struct mtd_info_user *meminfo, unsigned len, int oob) | 64 | static void dump_bad(struct mtd_info_user *meminfo, unsigned len, int oob) |
diff --git a/miscutils/runlevel.c b/miscutils/runlevel.c index 608e87fe1..363e45049 100644 --- a/miscutils/runlevel.c +++ b/miscutils/runlevel.c | |||
@@ -1,11 +1,11 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | 1 | /* vi: set sw=4 ts=4: */ |
2 | /* | 2 | /* |
3 | * runlevel Prints out the previous and the current runlevel. | 3 | * Prints out the previous and the current runlevel. |
4 | * | 4 | * |
5 | * Version: @(#)runlevel 1.20 16-Apr-1997 MvS | 5 | * Version: @(#)runlevel 1.20 16-Apr-1997 MvS |
6 | * | 6 | * |
7 | * This file is part of the sysvinit suite, | 7 | * This file is part of the sysvinit suite, |
8 | * Copyright 1991-1997 Miquel van Smoorenburg. | 8 | * Copyright 1991-1997 Miquel van Smoorenburg. |
9 | * | 9 | * |
10 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 10 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
11 | * | 11 | * |
diff --git a/miscutils/strings.c b/miscutils/strings.c index 40478de40..7ab0e227c 100644 --- a/miscutils/strings.c +++ b/miscutils/strings.c | |||
@@ -9,10 +9,10 @@ | |||
9 | 9 | ||
10 | #include "libbb.h" | 10 | #include "libbb.h" |
11 | 11 | ||
12 | #define WHOLE_FILE 1 | 12 | #define WHOLE_FILE 1 |
13 | #define PRINT_NAME 2 | 13 | #define PRINT_NAME 2 |
14 | #define PRINT_OFFSET 4 | 14 | #define PRINT_OFFSET 4 |
15 | #define SIZE 8 | 15 | #define SIZE 8 |
16 | 16 | ||
17 | int strings_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 17 | int strings_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
18 | int strings_main(int argc UNUSED_PARAM, char **argv) | 18 | int strings_main(int argc UNUSED_PARAM, char **argv) |
diff --git a/miscutils/watchdog.c b/miscutils/watchdog.c index 332539658..36902a214 100644 --- a/miscutils/watchdog.c +++ b/miscutils/watchdog.c | |||
@@ -21,7 +21,7 @@ static void watchdog_shutdown(int sig UNUSED_PARAM) | |||
21 | { | 21 | { |
22 | static const char V = 'V'; | 22 | static const char V = 'V'; |
23 | 23 | ||
24 | write(3, &V, 1); /* Magic, see watchdog-api.txt in kernel */ | 24 | write(3, &V, 1); /* Magic, see watchdog-api.txt in kernel */ |
25 | if (ENABLE_FEATURE_CLEAN_UP) | 25 | if (ENABLE_FEATURE_CLEAN_UP) |
26 | close(3); | 26 | close(3); |
27 | exit(EXIT_SUCCESS); | 27 | exit(EXIT_SUCCESS); |
diff --git a/networking/brctl.c b/networking/brctl.c index 0defce46a..c0b094eba 100644 --- a/networking/brctl.c +++ b/networking/brctl.c | |||
@@ -184,7 +184,7 @@ int brctl_main(int argc UNUSED_PARAM, char **argv) | |||
184 | tabs = 1; | 184 | tabs = 1; |
185 | printf("\t\t%s\n", ifname); | 185 | printf("\t\t%s\n", ifname); |
186 | } | 186 | } |
187 | if (!tabs) /* bridge has no interfaces */ | 187 | if (!tabs) /* bridge has no interfaces */ |
188 | bb_putchar('\n'); | 188 | bb_putchar('\n'); |
189 | } | 189 | } |
190 | goto done; | 190 | goto done; |
diff --git a/networking/ether-wake.c b/networking/ether-wake.c index 121f15366..8f1479c02 100644 --- a/networking/ether-wake.c +++ b/networking/ether-wake.c | |||
@@ -189,12 +189,12 @@ int ether_wake_main(int argc UNUSED_PARAM, char **argv) | |||
189 | unsigned flags; | 189 | unsigned flags; |
190 | unsigned char wol_passwd[6]; | 190 | unsigned char wol_passwd[6]; |
191 | int wol_passwd_sz = 0; | 191 | int wol_passwd_sz = 0; |
192 | int s; /* Raw socket */ | 192 | int s; /* Raw socket */ |
193 | int pktsize; | 193 | int pktsize; |
194 | unsigned char outpack[1000]; | 194 | unsigned char outpack[1000]; |
195 | 195 | ||
196 | struct ether_addr eaddr; | 196 | struct ether_addr eaddr; |
197 | struct whereto_t whereto; /* who to wake up */ | 197 | struct whereto_t whereto; /* who to wake up */ |
198 | 198 | ||
199 | /* handle misc user options */ | 199 | /* handle misc user options */ |
200 | opt_complementary = "=1"; | 200 | opt_complementary = "=1"; |
diff --git a/networking/ifupdown.c b/networking/ifupdown.c index 864fc2acd..3cb1ec858 100644 --- a/networking/ifupdown.c +++ b/networking/ifupdown.c | |||
@@ -644,7 +644,7 @@ static const struct address_family_t addr_inet = { | |||
644 | methods | 644 | methods |
645 | }; | 645 | }; |
646 | 646 | ||
647 | #endif /* if ENABLE_FEATURE_IFUPDOWN_IPV4 */ | 647 | #endif /* if ENABLE_FEATURE_IFUPDOWN_IPV4 */ |
648 | 648 | ||
649 | /* Returns pointer to the next word, or NULL. | 649 | /* Returns pointer to the next word, or NULL. |
650 | * In 1st case, advances *buf to the word after this one. | 650 | * In 1st case, advances *buf to the word after this one. |
diff --git a/networking/libiproute/iplink.c b/networking/libiproute/iplink.c index f9421fc68..c5ba294aa 100644 --- a/networking/libiproute/iplink.c +++ b/networking/libiproute/iplink.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #endif | 21 | #endif |
22 | 22 | ||
23 | /* taken from linux/sockios.h */ | 23 | /* taken from linux/sockios.h */ |
24 | #define SIOCSIFNAME 0x8923 /* set interface name */ | 24 | #define SIOCSIFNAME 0x8923 /* set interface name */ |
25 | 25 | ||
26 | /* Exits on error */ | 26 | /* Exits on error */ |
27 | static int get_ctl_fd(void) | 27 | static int get_ctl_fd(void) |
diff --git a/networking/ping.c b/networking/ping.c index e18d88e39..3aba4906e 100644 --- a/networking/ping.c +++ b/networking/ping.c | |||
@@ -297,11 +297,11 @@ void BUG_ping_globals_too_big(void); | |||
297 | } while (0) | 297 | } while (0) |
298 | 298 | ||
299 | 299 | ||
300 | #define A(bit) rcvd_tbl[(bit)>>3] /* identify byte in array */ | 300 | #define A(bit) rcvd_tbl[(bit)>>3] /* identify byte in array */ |
301 | #define B(bit) (1 << ((bit) & 0x07)) /* identify bit in byte */ | 301 | #define B(bit) (1 << ((bit) & 0x07)) /* identify bit in byte */ |
302 | #define SET(bit) (A(bit) |= B(bit)) | 302 | #define SET(bit) (A(bit) |= B(bit)) |
303 | #define CLR(bit) (A(bit) &= (~B(bit))) | 303 | #define CLR(bit) (A(bit) &= (~B(bit))) |
304 | #define TST(bit) (A(bit) & B(bit)) | 304 | #define TST(bit) (A(bit) & B(bit)) |
305 | 305 | ||
306 | /**************************************************************************/ | 306 | /**************************************************************************/ |
307 | 307 | ||
diff --git a/networking/tc.c b/networking/tc.c index 48d164285..9242741e4 100644 --- a/networking/tc.c +++ b/networking/tc.c | |||
@@ -1,10 +1,10 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | 1 | /* vi: set sw=4 ts=4: */ |
2 | /* | 2 | /* |
3 | * tc.c "tc" utility frontend. | 3 | * "tc" utility frontend. |
4 | * | 4 | * |
5 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 5 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
6 | * | 6 | * |
7 | * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> | 7 | * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> |
8 | * | 8 | * |
9 | * Bernhard Reutner-Fischer adjusted for busybox | 9 | * Bernhard Reutner-Fischer adjusted for busybox |
10 | */ | 10 | */ |
diff --git a/networking/tftp.c b/networking/tftp.c index 0269a93ab..04c8f0ebb 100644 --- a/networking/tftp.c +++ b/networking/tftp.c | |||
@@ -447,7 +447,7 @@ static int tftp_protocol( | |||
447 | /* NB: send_len value is preserved in code below | 447 | /* NB: send_len value is preserved in code below |
448 | * for potential resend */ | 448 | * for potential resend */ |
449 | 449 | ||
450 | retries = TFTP_NUM_RETRIES; /* re-initialize */ | 450 | retries = TFTP_NUM_RETRIES; /* re-initialize */ |
451 | waittime_ms = TFTP_TIMEOUT_MS; | 451 | waittime_ms = TFTP_TIMEOUT_MS; |
452 | 452 | ||
453 | send_again: | 453 | send_again: |
diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c index f0878652c..a015cf038 100644 --- a/networking/udhcp/dhcpd.c +++ b/networking/udhcp/dhcpd.c | |||
@@ -413,7 +413,7 @@ int udhcpd_main(int argc UNUSED_PARAM, char **argv) | |||
413 | case SIGTERM: | 413 | case SIGTERM: |
414 | bb_info_msg("Received SIGTERM"); | 414 | bb_info_msg("Received SIGTERM"); |
415 | goto ret0; | 415 | goto ret0; |
416 | case 0: /* no signal: read a packet */ | 416 | case 0: /* no signal: read a packet */ |
417 | break; | 417 | break; |
418 | default: /* signal or error (probably EINTR): back to select */ | 418 | default: /* signal or error (probably EINTR): back to select */ |
419 | continue; | 419 | continue; |
diff --git a/networking/udhcp/dumpleases.c b/networking/udhcp/dumpleases.c index 46610fc63..a15e409cc 100644 --- a/networking/udhcp/dumpleases.c +++ b/networking/udhcp/dumpleases.c | |||
@@ -18,9 +18,9 @@ int dumpleases_main(int argc UNUSED_PARAM, char **argv) | |||
18 | struct in_addr addr; | 18 | struct in_addr addr; |
19 | 19 | ||
20 | enum { | 20 | enum { |
21 | OPT_a = 0x1, // -a | 21 | OPT_a = 0x1, // -a |
22 | OPT_r = 0x2, // -r | 22 | OPT_r = 0x2, // -r |
23 | OPT_f = 0x4, // -f | 23 | OPT_f = 0x4, // -f |
24 | }; | 24 | }; |
25 | #if ENABLE_LONG_OPTS | 25 | #if ENABLE_LONG_OPTS |
26 | static const char dumpleases_longopts[] ALIGN1 = | 26 | static const char dumpleases_longopts[] ALIGN1 = |
diff --git a/procps/powertop.c b/procps/powertop.c index 5e028f074..250da817b 100644 --- a/procps/powertop.c +++ b/procps/powertop.c | |||
@@ -39,7 +39,7 @@ | |||
39 | 39 | ||
40 | /* Frequency of the ACPI timer */ | 40 | /* Frequency of the ACPI timer */ |
41 | #define FREQ_ACPI 3579.545 | 41 | #define FREQ_ACPI 3579.545 |
42 | #define FREQ_ACPI_1000 3579545 | 42 | #define FREQ_ACPI_1000 3579545 |
43 | 43 | ||
44 | /* Max filename length of entry in /sys/devices subsystem */ | 44 | /* Max filename length of entry in /sys/devices subsystem */ |
45 | #define BIG_SYSNAME_LEN 16 | 45 | #define BIG_SYSNAME_LEN 16 |
@@ -115,8 +115,8 @@ static int write_str_to_file(const char *fname, const char *str) | |||
115 | } | 115 | } |
116 | 116 | ||
117 | /* Make it more readable */ | 117 | /* Make it more readable */ |
118 | #define start_timer() write_str_to_file("/proc/timer_stats", "1\n") | 118 | #define start_timer() write_str_to_file("/proc/timer_stats", "1\n") |
119 | #define stop_timer() write_str_to_file("/proc/timer_stats", "0\n") | 119 | #define stop_timer() write_str_to_file("/proc/timer_stats", "0\n") |
120 | 120 | ||
121 | static NOINLINE void clear_lines(void) | 121 | static NOINLINE void clear_lines(void) |
122 | { | 122 | { |
@@ -362,7 +362,7 @@ static void process_irq_counts(void) | |||
362 | } | 362 | } |
363 | /* 0: 143646045 153901007 IO-APIC-edge timer | 363 | /* 0: 143646045 153901007 IO-APIC-edge timer |
364 | * NMI: 1 2 Non-maskable interrupts | 364 | * NMI: 1 2 Non-maskable interrupts |
365 | * ^ | 365 | * ^ |
366 | */ | 366 | */ |
367 | if (nr < 20000) { | 367 | if (nr < 20000) { |
368 | /* Skip to the interrupt name, e.g. 'timer' */ | 368 | /* Skip to the interrupt name, e.g. 'timer' */ |
@@ -539,9 +539,9 @@ static void cpuid(unsigned int *eax, unsigned int *ebx, unsigned int *ecx, | |||
539 | } | 539 | } |
540 | #endif | 540 | #endif |
541 | 541 | ||
542 | #ifdef __i386__ | ||
542 | static NOINLINE void print_intel_cstates(void) | 543 | static NOINLINE void print_intel_cstates(void) |
543 | { | 544 | { |
544 | #ifdef __i386__ | ||
545 | int bios_table[8] = { 0 }; | 545 | int bios_table[8] = { 0 }; |
546 | int nbios = 0; | 546 | int nbios = 0; |
547 | DIR *cpudir; | 547 | DIR *cpudir; |
@@ -628,13 +628,15 @@ static NOINLINE void print_intel_cstates(void) | |||
628 | 628 | ||
629 | /* Print BIOS C-States */ | 629 | /* Print BIOS C-States */ |
630 | printf("Your BIOS reports the following C-states: "); | 630 | printf("Your BIOS reports the following C-states: "); |
631 | for (i = 0; i < 8; i++) | 631 | for (i = 0; i < ARRAY_SIZE(bios_table); i++) |
632 | if (bios_table[i]) | 632 | if (bios_table[i]) |
633 | printf("C%u ", i); | 633 | printf("C%u ", i); |
634 | 634 | ||
635 | bb_putchar('\n'); | 635 | bb_putchar('\n'); |
636 | #endif | ||
637 | } | 636 | } |
637 | #else | ||
638 | # define print_intel_cstates(void) ((void)0) | ||
639 | #endif | ||
638 | 640 | ||
639 | static void show_timerstats(void) | 641 | static void show_timerstats(void) |
640 | { | 642 | { |
@@ -817,7 +819,7 @@ int powertop_main(int UNUSED_PARAM argc, char UNUSED_PARAM **argv) | |||
817 | 819 | ||
818 | sprintf(cstate_lines[0], "Cn\t\t Avg residency\n"); | 820 | sprintf(cstate_lines[0], "Cn\t\t Avg residency\n"); |
819 | percentage = newticks * 100.0 / (G.total_cpus * DEFAULT_SLEEP * FREQ_ACPI_1000); | 821 | percentage = newticks * 100.0 / (G.total_cpus * DEFAULT_SLEEP * FREQ_ACPI_1000); |
820 | sprintf(cstate_lines[1], "C0 (cpu running) (%4.1f%%)\n", percentage); | 822 | sprintf(cstate_lines[1], "C0 (cpu running) (%4.1f%%)\n", percentage); |
821 | 823 | ||
822 | /* Compute values for individual C-states */ | 824 | /* Compute values for individual C-states */ |
823 | for (i = 0; i < MAX_CSTATE_COUNT; i++) { | 825 | for (i = 0; i < MAX_CSTATE_COUNT; i++) { |
diff --git a/procps/renice.c b/procps/renice.c index 0a73cbeeb..59194b5f4 100644 --- a/procps/renice.c +++ b/procps/renice.c | |||
@@ -32,7 +32,7 @@ int renice_main(int argc UNUSED_PARAM, char **argv) | |||
32 | static const char Xetpriority_msg[] ALIGN1 = "%cetpriority"; | 32 | static const char Xetpriority_msg[] ALIGN1 = "%cetpriority"; |
33 | 33 | ||
34 | int retval = EXIT_SUCCESS; | 34 | int retval = EXIT_SUCCESS; |
35 | int which = PRIO_PROCESS; /* Default 'which' value. */ | 35 | int which = PRIO_PROCESS; /* Default 'which' value. */ |
36 | int use_relative = 0; | 36 | int use_relative = 0; |
37 | int adjustment, new_priority; | 37 | int adjustment, new_priority; |
38 | unsigned who; | 38 | unsigned who; |
@@ -57,7 +57,7 @@ int renice_main(int argc UNUSED_PARAM, char **argv) | |||
57 | arg += 2; | 57 | arg += 2; |
58 | } | 58 | } |
59 | 59 | ||
60 | if (!arg) { /* No args? Then show usage. */ | 60 | if (!arg) { /* No args? Then show usage. */ |
61 | bb_show_usage(); | 61 | bb_show_usage(); |
62 | } | 62 | } |
63 | 63 | ||
@@ -100,7 +100,7 @@ int renice_main(int argc UNUSED_PARAM, char **argv) | |||
100 | if (use_relative) { | 100 | if (use_relative) { |
101 | int old_priority; | 101 | int old_priority; |
102 | 102 | ||
103 | errno = 0; /* Needed for getpriority error detection. */ | 103 | errno = 0; /* Needed for getpriority error detection. */ |
104 | old_priority = getpriority(which, who); | 104 | old_priority = getpriority(which, who); |
105 | if (errno) { | 105 | if (errno) { |
106 | bb_perror_msg(Xetpriority_msg, 'g'); | 106 | bb_perror_msg(Xetpriority_msg, 'g'); |
diff --git a/runit/chpst.c b/runit/chpst.c index b08d42300..dc8a26aeb 100644 --- a/runit/chpst.c +++ b/runit/chpst.c | |||
@@ -122,10 +122,10 @@ static NOINLINE void edir(const char *directory_name) | |||
122 | if ((errno == EISDIR) && directory_name) { | 122 | if ((errno == EISDIR) && directory_name) { |
123 | if (option_mask32 & OPT_v) | 123 | if (option_mask32 & OPT_v) |
124 | bb_perror_msg("warning: %s/%s is a directory", | 124 | bb_perror_msg("warning: %s/%s is a directory", |
125 | directory_name, d->d_name); | 125 | directory_name, d->d_name); |
126 | continue; | 126 | continue; |
127 | } else | 127 | } |
128 | bb_perror_msg_and_die("open %s/%s", | 128 | bb_perror_msg_and_die("open %s/%s", |
129 | directory_name, d->d_name); | 129 | directory_name, d->d_name); |
130 | } | 130 | } |
131 | size = full_read(fd, buf, sizeof(buf)-1); | 131 | size = full_read(fd, buf, sizeof(buf)-1); |
diff --git a/runit/svlogd.c b/runit/svlogd.c index 052806c25..c3ff4e9c1 100644 --- a/runit/svlogd.c +++ b/runit/svlogd.c | |||
@@ -1114,7 +1114,8 @@ int svlogd_main(int argc, char **argv) | |||
1114 | /* Search for '\n' (in fact, np already holds the result) */ | 1114 | /* Search for '\n' (in fact, np already holds the result) */ |
1115 | linelen = stdin_cnt; | 1115 | linelen = stdin_cnt; |
1116 | if (np) { | 1116 | if (np) { |
1117 | print_to_nl: /* NB: starting from here lineptr may point | 1117 | print_to_nl: |
1118 | /* NB: starting from here lineptr may point | ||
1118 | * farther out into line[] */ | 1119 | * farther out into line[] */ |
1119 | linelen = np - lineptr + 1; | 1120 | linelen = np - lineptr + 1; |
1120 | } | 1121 | } |
diff --git a/shell/ash.c b/shell/ash.c index fbf3efce2..5ef7efbdb 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -7623,7 +7623,7 @@ hashcd(void) | |||
7623 | for (cmdp = *pp; cmdp; cmdp = cmdp->next) { | 7623 | for (cmdp = *pp; cmdp; cmdp = cmdp->next) { |
7624 | if (cmdp->cmdtype == CMDNORMAL | 7624 | if (cmdp->cmdtype == CMDNORMAL |
7625 | || (cmdp->cmdtype == CMDBUILTIN | 7625 | || (cmdp->cmdtype == CMDBUILTIN |
7626 | && !IS_BUILTIN_REGULAR(cmdp->param.cmd) | 7626 | && !IS_BUILTIN_REGULAR(cmdp->param.cmd) |
7627 | && builtinloc > 0) | 7627 | && builtinloc > 0) |
7628 | ) { | 7628 | ) { |
7629 | cmdp->rehash = 1; | 7629 | cmdp->rehash = 1; |
@@ -12325,7 +12325,7 @@ find_command(char *name, struct cmdentry *entry, int act, const char *path) | |||
12325 | } | 12325 | } |
12326 | if ((act & DO_NOFUNC) | 12326 | if ((act & DO_NOFUNC) |
12327 | || !prefix(pathopt, "func") | 12327 | || !prefix(pathopt, "func") |
12328 | ) { /* ignore unimplemented options */ | 12328 | ) { /* ignore unimplemented options */ |
12329 | continue; | 12329 | continue; |
12330 | } | 12330 | } |
12331 | } | 12331 | } |
diff --git a/shell/hush.c b/shell/hush.c index 75083dc2e..9dd30c436 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -2765,7 +2765,7 @@ static const struct reserved_combo* match_reserved_word(o_string *word) | |||
2765 | }; | 2765 | }; |
2766 | const struct reserved_combo *r; | 2766 | const struct reserved_combo *r; |
2767 | 2767 | ||
2768 | for (r = reserved_list; r < reserved_list + ARRAY_SIZE(reserved_list); r++) { | 2768 | for (r = reserved_list; r < reserved_list + ARRAY_SIZE(reserved_list); r++) { |
2769 | if (strcmp(word->data, r->literal) == 0) | 2769 | if (strcmp(word->data, r->literal) == 0) |
2770 | return r; | 2770 | return r; |
2771 | } | 2771 | } |
@@ -4660,7 +4660,7 @@ static NOINLINE const char *expand_one_var(char **to_be_freed_pp, char *arg, cha | |||
4660 | char *exp_exp_word; | 4660 | char *exp_exp_word; |
4661 | char *loc; | 4661 | char *loc; |
4662 | unsigned scan_flags = pick_scan(exp_op, *exp_word); | 4662 | unsigned scan_flags = pick_scan(exp_op, *exp_word); |
4663 | if (exp_op == *exp_word) /* ## or %% */ | 4663 | if (exp_op == *exp_word) /* ## or %% */ |
4664 | exp_word++; | 4664 | exp_word++; |
4665 | exp_exp_word = encode_then_expand_string(exp_word, /*process_bkslash:*/ 1, /*unbackslash:*/ 1); | 4665 | exp_exp_word = encode_then_expand_string(exp_word, /*process_bkslash:*/ 1, /*unbackslash:*/ 1); |
4666 | if (exp_exp_word) | 4666 | if (exp_exp_word) |
diff --git a/sysklogd/logger.c b/sysklogd/logger.c index ff1519192..120f6a718 100644 --- a/sysklogd/logger.c +++ b/sysklogd/logger.c | |||
@@ -121,7 +121,7 @@ int logger_main(int argc UNUSED_PARAM, char **argv) | |||
121 | 121 | ||
122 | /*- | 122 | /*- |
123 | * Copyright (c) 1983, 1993 | 123 | * Copyright (c) 1983, 1993 |
124 | * The Regents of the University of California. All rights reserved. | 124 | * The Regents of the University of California. All rights reserved. |
125 | * | 125 | * |
126 | * This is the original license statement for the decode and pencode functions. | 126 | * This is the original license statement for the decode and pencode functions. |
127 | * | 127 | * |
@@ -134,8 +134,8 @@ int logger_main(int argc UNUSED_PARAM, char **argv) | |||
134 | * notice, this list of conditions and the following disclaimer in the | 134 | * notice, this list of conditions and the following disclaimer in the |
135 | * documentation and/or other materials provided with the distribution. | 135 | * documentation and/or other materials provided with the distribution. |
136 | * | 136 | * |
137 | * 3. <BSD Advertising Clause omitted per the July 22, 1999 licensing change | 137 | * 3. BSD Advertising Clause omitted per the July 22, 1999 licensing change |
138 | * ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change> | 138 | * ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change |
139 | * | 139 | * |
140 | * 4. Neither the name of the University nor the names of its contributors | 140 | * 4. Neither the name of the University nor the names of its contributors |
141 | * may be used to endorse or promote products derived from this software | 141 | * may be used to endorse or promote products derived from this software |
diff --git a/util-linux/acpid.c b/util-linux/acpid.c index 5a3bd5a6a..0b227a8ae 100644 --- a/util-linux/acpid.c +++ b/util-linux/acpid.c | |||
@@ -52,7 +52,7 @@ struct globals { | |||
52 | int n_evt; | 52 | int n_evt; |
53 | } FIX_ALIASING; | 53 | } FIX_ALIASING; |
54 | #define G (*ptr_to_globals) | 54 | #define G (*ptr_to_globals) |
55 | #define act_tab (G.act_tab) | 55 | #define act_tab (G.act_tab) |
56 | #define n_act (G.n_act ) | 56 | #define n_act (G.n_act ) |
57 | #define evt_tab (G.evt_tab) | 57 | #define evt_tab (G.evt_tab) |
58 | #define n_evt (G.n_evt ) | 58 | #define n_evt (G.n_evt ) |
diff --git a/util-linux/fdformat.c b/util-linux/fdformat.c index f5c386c46..57e9c26f8 100644 --- a/util-linux/fdformat.c +++ b/util-linux/fdformat.c | |||
@@ -36,7 +36,7 @@ struct format_descr { | |||
36 | unsigned int device,head,track; | 36 | unsigned int device,head,track; |
37 | }; | 37 | }; |
38 | #define FDFMTBEG _IO(2,0x47) | 38 | #define FDFMTBEG _IO(2,0x47) |
39 | #define FDFMTTRK _IOW(2,0x48, struct format_descr) | 39 | #define FDFMTTRK _IOW(2,0x48, struct format_descr) |
40 | #define FDFMTEND _IO(2,0x49) | 40 | #define FDFMTEND _IO(2,0x49) |
41 | #define FDGETPRM _IOR(2, 0x04, struct floppy_struct) | 41 | #define FDGETPRM _IOR(2, 0x04, struct floppy_struct) |
42 | #define FD_FILL_BYTE 0xF6 /* format fill byte. */ | 42 | #define FD_FILL_BYTE 0xF6 /* format fill byte. */ |
diff --git a/util-linux/fdisk_gpt.c b/util-linux/fdisk_gpt.c index 1ab1293de..d43d9c709 100644 --- a/util-linux/fdisk_gpt.c +++ b/util-linux/fdisk_gpt.c | |||
@@ -7,7 +7,7 @@ | |||
7 | 7 | ||
8 | #define GPT_MAGIC 0x5452415020494645ULL | 8 | #define GPT_MAGIC 0x5452415020494645ULL |
9 | enum { | 9 | enum { |
10 | LEGACY_GPT_TYPE = 0xee, | 10 | LEGACY_GPT_TYPE = 0xee, |
11 | GPT_MAX_PARTS = 256, | 11 | GPT_MAX_PARTS = 256, |
12 | GPT_MAX_PART_ENTRY_LEN = 4096, | 12 | GPT_MAX_PART_ENTRY_LEN = 4096, |
13 | GUID_LEN = 16, | 13 | GUID_LEN = 16, |
diff --git a/util-linux/fdisk_sun.c b/util-linux/fdisk_sun.c index 6b7940c54..e7fcc067c 100644 --- a/util-linux/fdisk_sun.c +++ b/util-linux/fdisk_sun.c | |||
@@ -654,7 +654,7 @@ sun_list_table(int xtra) | |||
654 | uint32_t start = SUN_SSWAP32(sunlabel->partitions[i].start_cylinder) * g_heads * g_sectors; | 654 | uint32_t start = SUN_SSWAP32(sunlabel->partitions[i].start_cylinder) * g_heads * g_sectors; |
655 | uint32_t len = SUN_SSWAP32(sunlabel->partitions[i].num_sectors); | 655 | uint32_t len = SUN_SSWAP32(sunlabel->partitions[i].num_sectors); |
656 | printf("%s %c%c %9lu %9lu %9lu%c %2x %s\n", | 656 | printf("%s %c%c %9lu %9lu %9lu%c %2x %s\n", |
657 | partname(disk_device, i+1, w), /* device */ | 657 | partname(disk_device, i+1, w), /* device */ |
658 | (sunlabel->infos[i].flags & 0x01) ? 'u' : ' ', /* flags */ | 658 | (sunlabel->infos[i].flags & 0x01) ? 'u' : ' ', /* flags */ |
659 | (sunlabel->infos[i].flags & 0x10) ? 'r' : ' ', | 659 | (sunlabel->infos[i].flags & 0x10) ? 'r' : ' ', |
660 | (long) scround(start), /* start */ | 660 | (long) scround(start), /* start */ |
diff --git a/util-linux/ipcrm.c b/util-linux/ipcrm.c index 6360c706f..731216c06 100644 --- a/util-linux/ipcrm.c +++ b/util-linux/ipcrm.c | |||
@@ -43,7 +43,6 @@ typedef enum type_id { | |||
43 | static int remove_ids(type_id type, int argc, char **argv) | 43 | static int remove_ids(type_id type, int argc, char **argv) |
44 | { | 44 | { |
45 | unsigned long id; | 45 | unsigned long id; |
46 | int ret = 0; /* silence gcc */ | ||
47 | int nb_errors = 0; | 46 | int nb_errors = 0; |
48 | union semun arg; | 47 | union semun arg; |
49 | 48 | ||
@@ -55,6 +54,7 @@ static int remove_ids(type_id type, int argc, char **argv) | |||
55 | bb_error_msg("invalid id: %s", argv[0]); | 54 | bb_error_msg("invalid id: %s", argv[0]); |
56 | nb_errors++; | 55 | nb_errors++; |
57 | } else { | 56 | } else { |
57 | int ret = 0; | ||
58 | if (type == SEM) | 58 | if (type == SEM) |
59 | ret = semctl(id, 0, IPC_RMID, arg); | 59 | ret = semctl(id, 0, IPC_RMID, arg); |
60 | else if (type == MSG) | 60 | else if (type == MSG) |
@@ -92,14 +92,13 @@ int ipcrm_main(int argc, char **argv) | |||
92 | type_id what = 0; /* silence gcc */ | 92 | type_id what = 0; /* silence gcc */ |
93 | char w; | 93 | char w; |
94 | 94 | ||
95 | w=argv[1][0]; | 95 | w = argv[1][0]; |
96 | if ( ((w == 'm' && argv[1][1] == 's' && argv[1][2] == 'g') | 96 | if ( ((w == 'm' && argv[1][1] == 's' && argv[1][2] == 'g') |
97 | || (argv[1][0] == 's' | 97 | || (argv[1][0] == 's' |
98 | && ((w=argv[1][1]) == 'h' || w == 'e') | 98 | && ((w = argv[1][1]) == 'h' || w == 'e') |
99 | && argv[1][2] == 'm') | 99 | && argv[1][2] == 'm') |
100 | ) && argv[1][3] == '\0' | 100 | ) && argv[1][3] == '\0' |
101 | ) { | 101 | ) { |
102 | |||
103 | if (argc < 3) | 102 | if (argc < 3) |
104 | bb_show_usage(); | 103 | bb_show_usage(); |
105 | 104 | ||
diff --git a/util-linux/mkfs_ext2.c b/util-linux/mkfs_ext2.c index 6dccd3a5d..871ec835e 100644 --- a/util-linux/mkfs_ext2.c +++ b/util-linux/mkfs_ext2.c | |||
@@ -11,8 +11,8 @@ | |||
11 | #include <linux/fs.h> | 11 | #include <linux/fs.h> |
12 | #include <linux/ext2_fs.h> | 12 | #include <linux/ext2_fs.h> |
13 | 13 | ||
14 | #define ENABLE_FEATURE_MKFS_EXT2_RESERVED_GDT 0 | 14 | #define ENABLE_FEATURE_MKFS_EXT2_RESERVED_GDT 0 |
15 | #define ENABLE_FEATURE_MKFS_EXT2_DIR_INDEX 1 | 15 | #define ENABLE_FEATURE_MKFS_EXT2_DIR_INDEX 1 |
16 | 16 | ||
17 | // from e2fsprogs | 17 | // from e2fsprogs |
18 | #define s_reserved_gdt_blocks s_padding1 | 18 | #define s_reserved_gdt_blocks s_padding1 |
diff --git a/util-linux/mkfs_vfat.c b/util-linux/mkfs_vfat.c index 45760f7c5..bb5b59c66 100644 --- a/util-linux/mkfs_vfat.c +++ b/util-linux/mkfs_vfat.c | |||
@@ -28,7 +28,7 @@ | |||
28 | 28 | ||
29 | #define ATTR_VOLUME 8 | 29 | #define ATTR_VOLUME 8 |
30 | 30 | ||
31 | #define NUM_FATS 2 | 31 | #define NUM_FATS 2 |
32 | 32 | ||
33 | /* FAT32 filesystem looks like this: | 33 | /* FAT32 filesystem looks like this: |
34 | * sector -nn...-1: "hidden" sectors, all sectors before this partition | 34 | * sector -nn...-1: "hidden" sectors, all sectors before this partition |
diff --git a/util-linux/readprofile.c b/util-linux/readprofile.c index 00b3382d8..f8a6e0cd0 100644 --- a/util-linux/readprofile.c +++ b/util-linux/readprofile.c | |||
@@ -97,7 +97,7 @@ int readprofile_main(int argc UNUSED_PARAM, char **argv) | |||
97 | */ | 97 | */ |
98 | to_write = sizeof(int); | 98 | to_write = sizeof(int); |
99 | if (!optMult) | 99 | if (!optMult) |
100 | to_write = 1; /* sth different from sizeof(int) */ | 100 | to_write = 1; /* sth different from sizeof(int) */ |
101 | 101 | ||
102 | fd = xopen(defaultpro, O_WRONLY); | 102 | fd = xopen(defaultpro, O_WRONLY); |
103 | xwrite(fd, &multiplier, to_write); | 103 | xwrite(fd, &multiplier, to_write); |
@@ -179,7 +179,7 @@ int readprofile_main(int argc UNUSED_PARAM, char **argv) | |||
179 | if (*mode != 'T' && *mode != 't' | 179 | if (*mode != 'T' && *mode != 't' |
180 | && *mode != 'W' && *mode != 'w' | 180 | && *mode != 'W' && *mode != 'w' |
181 | ) { | 181 | ) { |
182 | break; /* only text is profiled */ | 182 | break; /* only text is profiled */ |
183 | } | 183 | } |
184 | 184 | ||
185 | if (indx >= len / sizeof(*buf)) | 185 | if (indx >= len / sizeof(*buf)) |
diff --git a/util-linux/rtcwake.c b/util-linux/rtcwake.c index 26e5b4724..06ed7eafc 100644 --- a/util-linux/rtcwake.c +++ b/util-linux/rtcwake.c | |||
@@ -50,7 +50,7 @@ static NOINLINE bool may_wakeup(const char *rtcname) | |||
50 | static NOINLINE void setup_alarm(int fd, time_t *wakeup, time_t rtc_time) | 50 | static NOINLINE void setup_alarm(int fd, time_t *wakeup, time_t rtc_time) |
51 | { | 51 | { |
52 | struct tm *ptm; | 52 | struct tm *ptm; |
53 | struct linux_rtc_wkalrm wake; | 53 | struct linux_rtc_wkalrm wake; |
54 | 54 | ||
55 | /* The wakeup time is in POSIX time (more or less UTC). | 55 | /* The wakeup time is in POSIX time (more or less UTC). |
56 | * Ideally RTCs use that same time; but PCs can't do that | 56 | * Ideally RTCs use that same time; but PCs can't do that |
diff --git a/util-linux/script.c b/util-linux/script.c index 0860bb083..b9317fc7c 100644 --- a/util-linux/script.c +++ b/util-linux/script.c | |||
@@ -6,7 +6,7 @@ | |||
6 | * | 6 | * |
7 | * Based on code from util-linux v 2.12r | 7 | * Based on code from util-linux v 2.12r |
8 | * Copyright (c) 1980 | 8 | * Copyright (c) 1980 |
9 | * The Regents of the University of California. All rights reserved. | 9 | * The Regents of the University of California. All rights reserved. |
10 | * | 10 | * |
11 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 11 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
12 | */ | 12 | */ |