diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2022-08-30 16:41:17 +0200 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2022-08-30 16:41:17 +0200 |
| commit | fe73c8d55795a8fe7e95fc2c00af6899817b96b8 (patch) | |
| tree | 1b772243f00c63d16ee4cf8bf6f80a6c7a53ee91 | |
| parent | 58598eb7093561d914a6254697e137b815f1fdfc (diff) | |
| download | busybox-w32-fe73c8d55795a8fe7e95fc2c00af6899817b96b8.tar.gz busybox-w32-fe73c8d55795a8fe7e95fc2c00af6899817b96b8.tar.bz2 busybox-w32-fe73c8d55795a8fe7e95fc2c00af6899817b96b8.zip | |
*: style fix
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| -rw-r--r-- | archival/dpkg.c | 2 | ||||
| -rw-r--r-- | coreutils/cut.c | 2 | ||||
| -rw-r--r-- | coreutils/test.c | 2 | ||||
| -rw-r--r-- | editors/patch.c | 16 | ||||
| -rw-r--r-- | editors/patch_toybox.c | 36 | ||||
| -rw-r--r-- | editors/vi.c | 2 | ||||
| -rw-r--r-- | examples/shutdown-1.0/script/hardshutdown.c | 4 | ||||
| -rw-r--r-- | miscutils/bc.c | 2 | ||||
| -rw-r--r-- | miscutils/devfsd.c | 6 | ||||
| -rw-r--r-- | miscutils/hdparm.c | 24 | ||||
| -rw-r--r-- | modutils/modutils-24.c | 2 | ||||
| -rw-r--r-- | networking/tc.c | 2 | ||||
| -rw-r--r-- | procps/nmeter.c | 4 |
13 files changed, 52 insertions, 52 deletions
diff --git a/archival/dpkg.c b/archival/dpkg.c index bf070a001..8031956e9 100644 --- a/archival/dpkg.c +++ b/archival/dpkg.c | |||
| @@ -1115,7 +1115,7 @@ static int check_deps(deb_file_t **deb_file, int deb_start /*, int dep_max_count | |||
| 1115 | if (package_edge->type == EDGE_PRE_DEPENDS | 1115 | if (package_edge->type == EDGE_PRE_DEPENDS |
| 1116 | || package_edge->type == EDGE_DEPENDS | 1116 | || package_edge->type == EDGE_DEPENDS |
| 1117 | ) { | 1117 | ) { |
| 1118 | int result=1; | 1118 | int result = 1; |
| 1119 | status_num = 0; | 1119 | status_num = 0; |
| 1120 | 1120 | ||
| 1121 | /* If we are inside an alternative then check | 1121 | /* If we are inside an alternative then check |
diff --git a/coreutils/cut.c b/coreutils/cut.c index 7009e74cf..55bdd9386 100644 --- a/coreutils/cut.c +++ b/coreutils/cut.c | |||
| @@ -167,7 +167,7 @@ static void cut_file(FILE *file, const char *delim, const char *odelim, | |||
| 167 | if (!cl_pos && !dcount && !shoe) { | 167 | if (!cl_pos && !dcount && !shoe) { |
| 168 | if (option_mask32 & CUT_OPT_SUPPRESS_FLGS) | 168 | if (option_mask32 & CUT_OPT_SUPPRESS_FLGS) |
| 169 | goto next_line; | 169 | goto next_line; |
| 170 | } else if (dcount<cut_lists[cl_pos].startpos) | 170 | } else if (dcount < cut_lists[cl_pos].startpos) |
| 171 | start = linelen; | 171 | start = linelen; |
| 172 | end = linelen; | 172 | end = linelen; |
| 173 | } else { | 173 | } else { |
diff --git a/coreutils/test.c b/coreutils/test.c index 840a0daaf..1d1e6d18b 100644 --- a/coreutils/test.c +++ b/coreutils/test.c | |||
| @@ -859,7 +859,7 @@ static number_t primary(enum token n) | |||
| 859 | if (check_operator(args[1]) != EOI) { /* if args[1] != NULL */ | 859 | if (check_operator(args[1]) != EOI) { /* if args[1] != NULL */ |
| 860 | if (args[2]) { | 860 | if (args[2]) { |
| 861 | // coreutils also does this: | 861 | // coreutils also does this: |
| 862 | // if (args[3] && args[0]="-l" && args[2] is BINOP) | 862 | // if (args[3] && args[0] = "-l" && args[2] is BINOP) |
| 863 | // return binop(1 /* prepended by -l */); | 863 | // return binop(1 /* prepended by -l */); |
| 864 | if (last_operator->op_type == BINOP) | 864 | if (last_operator->op_type == BINOP) |
| 865 | unnest_msg_and_return(binop(), "<primary: binop:%lld\n"); | 865 | unnest_msg_and_return(binop(), "<primary: binop:%lld\n"); |
diff --git a/editors/patch.c b/editors/patch.c index aebb5073e..f90d6854d 100644 --- a/editors/patch.c +++ b/editors/patch.c | |||
| @@ -138,9 +138,9 @@ static void do_line(void *data) | |||
| 138 | { | 138 | { |
| 139 | struct double_list *dlist = data; | 139 | struct double_list *dlist = data; |
| 140 | 140 | ||
| 141 | if (TT.state>1 && *dlist->data != TT.state) | 141 | if (TT.state > 1 && *dlist->data != TT.state) |
| 142 | fdprintf(TT.state == 2 ? 2 : TT.fileout, | 142 | fdprintf(TT.state == 2 ? 2 : TT.fileout, |
| 143 | "%s\n", dlist->data+(TT.state>3 ? 1 : 0)); | 143 | "%s\n", dlist->data + (TT.state > 3 ? 1 : 0)); |
| 144 | 144 | ||
| 145 | if (PATCH_DEBUG) fdprintf(2, "DO %d: %s\n", TT.state, dlist->data); | 145 | if (PATCH_DEBUG) fdprintf(2, "DO %d: %s\n", TT.state, dlist->data); |
| 146 | 146 | ||
| @@ -221,7 +221,7 @@ static int apply_one_hunk(void) | |||
| 221 | 221 | ||
| 222 | // Match EOF if there aren't as many ending context lines as beginning | 222 | // Match EOF if there aren't as many ending context lines as beginning |
| 223 | for (plist = TT.current_hunk; plist; plist = plist->next) { | 223 | for (plist = TT.current_hunk; plist; plist = plist->next) { |
| 224 | if (plist->data[0]==' ') matcheof++; | 224 | if (plist->data[0] == ' ') matcheof++; |
| 225 | else matcheof = 0; | 225 | else matcheof = 0; |
| 226 | if (PATCH_DEBUG) fdprintf(2, "HUNK:%s\n", plist->data); | 226 | if (PATCH_DEBUG) fdprintf(2, "HUNK:%s\n", plist->data); |
| 227 | } | 227 | } |
| @@ -433,15 +433,15 @@ int patch_main(int argc UNUSED_PARAM, char **argv) | |||
| 433 | 433 | ||
| 434 | // Are we assembling a hunk? | 434 | // Are we assembling a hunk? |
| 435 | if (state >= 2) { | 435 | if (state >= 2) { |
| 436 | if (*patchline==' ' || *patchline=='+' || *patchline=='-') { | 436 | if (*patchline == ' ' || *patchline == '+' || *patchline == '-') { |
| 437 | dlist_add(&TT.current_hunk, patchline); | 437 | dlist_add(&TT.current_hunk, patchline); |
| 438 | 438 | ||
| 439 | if (*patchline != '+') oldlen--; | 439 | if (*patchline != '+') oldlen--; |
| 440 | if (*patchline != '-') newlen--; | 440 | if (*patchline != '-') newlen--; |
| 441 | 441 | ||
| 442 | // Context line? | 442 | // Context line? |
| 443 | if (*patchline==' ' && state==2) TT.context++; | 443 | if (*patchline == ' ' && state == 2) TT.context++; |
| 444 | else state=3; | 444 | else state = 3; |
| 445 | 445 | ||
| 446 | // If we've consumed all expected hunk lines, apply the hunk. | 446 | // If we've consumed all expected hunk lines, apply the hunk. |
| 447 | 447 | ||
| @@ -469,9 +469,9 @@ int patch_main(int argc UNUSED_PARAM, char **argv) | |||
| 469 | free(*name); | 469 | free(*name); |
| 470 | // Trim date from end of filename (if any). We don't care. | 470 | // Trim date from end of filename (if any). We don't care. |
| 471 | for (s = patchline+4; *s && *s!='\t'; s++) | 471 | for (s = patchline+4; *s && *s!='\t'; s++) |
| 472 | if (*s=='\\' && s[1]) s++; | 472 | if (*s == '\\' && s[1]) s++; |
| 473 | i = atoi(s); | 473 | i = atoi(s); |
| 474 | if (i>1900 && i<=1970) | 474 | if (i > 1900 && i <= 1970) |
| 475 | *name = xstrdup("/dev/null"); | 475 | *name = xstrdup("/dev/null"); |
| 476 | else { | 476 | else { |
| 477 | *s = 0; | 477 | *s = 0; |
diff --git a/editors/patch_toybox.c b/editors/patch_toybox.c index 69a508b2e..5478ece7d 100644 --- a/editors/patch_toybox.c +++ b/editors/patch_toybox.c | |||
| @@ -79,7 +79,7 @@ void TOY_llist_free(void *list, void (*freeit)(void *data)) | |||
| 79 | else free(pop); | 79 | else free(pop); |
| 80 | 80 | ||
| 81 | // End doubly linked list too. | 81 | // End doubly linked list too. |
| 82 | if (list==pop) break; | 82 | if (list == pop) break; |
| 83 | } | 83 | } |
| 84 | } | 84 | } |
| 85 | 85 | ||
| @@ -137,11 +137,11 @@ char *get_rawline(int fd, long *plen, char end) | |||
| 137 | long len = 0; | 137 | long len = 0; |
| 138 | 138 | ||
| 139 | for (;;) { | 139 | for (;;) { |
| 140 | if (1>read(fd, &c, 1)) break; | 140 | if (1 > read(fd, &c, 1)) break; |
| 141 | if (!(len & 63)) buf=xrealloc(buf, len+65); | 141 | if (!(len & 63)) buf=xrealloc(buf, len+65); |
| 142 | if ((buf[len++]=c) == end) break; | 142 | if ((buf[len++] = c) == end) break; |
| 143 | } | 143 | } |
| 144 | if (buf) buf[len]=0; | 144 | if (buf) buf[len] = 0; |
| 145 | if (plen) *plen = len; | 145 | if (plen) *plen = len; |
| 146 | 146 | ||
| 147 | return buf; | 147 | return buf; |
| @@ -153,7 +153,7 @@ char *get_line(int fd) | |||
| 153 | long len; | 153 | long len; |
| 154 | char *buf = get_rawline(fd, &len, '\n'); | 154 | char *buf = get_rawline(fd, &len, '\n'); |
| 155 | 155 | ||
| 156 | if (buf && buf[--len]=='\n') buf[len]=0; | 156 | if (buf && buf[--len] == '\n') buf[len] = 0; |
| 157 | 157 | ||
| 158 | return buf; | 158 | return buf; |
| 159 | } | 159 | } |
| @@ -165,10 +165,10 @@ void xsendfile(int in, int out) | |||
| 165 | long len; | 165 | long len; |
| 166 | char buf[4096]; | 166 | char buf[4096]; |
| 167 | 167 | ||
| 168 | if (in<0) return; | 168 | if (in < 0) return; |
| 169 | for (;;) { | 169 | for (;;) { |
| 170 | len = safe_read(in, buf, 4096); | 170 | len = safe_read(in, buf, 4096); |
| 171 | if (len<1) break; | 171 | if (len < 1) break; |
| 172 | xwrite(out, buf, len); | 172 | xwrite(out, buf, len); |
| 173 | } | 173 | } |
| 174 | } | 174 | } |
| @@ -179,7 +179,7 @@ void replace_tempfile(int fdin, int fdout, char **tempname) | |||
| 179 | { | 179 | { |
| 180 | char *temp = xstrdup(*tempname); | 180 | char *temp = xstrdup(*tempname); |
| 181 | 181 | ||
| 182 | temp[strlen(temp)-6]=0; | 182 | temp[strlen(temp)-6] = 0; |
| 183 | if (fdin != -1) { | 183 | if (fdin != -1) { |
| 184 | xsendfile(fdin, fdout); | 184 | xsendfile(fdin, fdout); |
| 185 | xclose(fdin); | 185 | xclose(fdin); |
| @@ -263,9 +263,9 @@ static void do_line(void *data) | |||
| 263 | { | 263 | { |
| 264 | struct double_list *dlist = (struct double_list *)data; | 264 | struct double_list *dlist = (struct double_list *)data; |
| 265 | 265 | ||
| 266 | if (TT.state>1 && *dlist->data != TT.state) | 266 | if (TT.state > 1 && *dlist->data != TT.state) |
| 267 | fdprintf(TT.state == 2 ? 2 : TT.fileout, | 267 | fdprintf(TT.state == 2 ? 2 : TT.fileout, |
| 268 | "%s\n", dlist->data+(TT.state>3 ? 1 : 0)); | 268 | "%s\n", dlist->data + (TT.state > 3 ? 1 : 0)); |
| 269 | 269 | ||
| 270 | if (PATCH_DEBUG) fdprintf(2, "DO %d: %s\n", TT.state, dlist->data); | 270 | if (PATCH_DEBUG) fdprintf(2, "DO %d: %s\n", TT.state, dlist->data); |
| 271 | 271 | ||
| @@ -314,7 +314,7 @@ static int apply_one_hunk(void) | |||
| 314 | 314 | ||
| 315 | // Match EOF if there aren't as many ending context lines as beginning | 315 | // Match EOF if there aren't as many ending context lines as beginning |
| 316 | for (plist = TT.current_hunk; plist; plist = plist->next) { | 316 | for (plist = TT.current_hunk; plist; plist = plist->next) { |
| 317 | if (plist->data[0]==' ') matcheof++; | 317 | if (plist->data[0] == ' ') matcheof++; |
| 318 | else matcheof = 0; | 318 | else matcheof = 0; |
| 319 | if (PATCH_DEBUG) fdprintf(2, "HUNK:%s\n", plist->data); | 319 | if (PATCH_DEBUG) fdprintf(2, "HUNK:%s\n", plist->data); |
| 320 | } | 320 | } |
| @@ -385,7 +385,7 @@ static int apply_one_hunk(void) | |||
| 385 | 385 | ||
| 386 | // If we've reached the end of the buffer without confirming a | 386 | // If we've reached the end of the buffer without confirming a |
| 387 | // match, read more lines. | 387 | // match, read more lines. |
| 388 | if (check==buf) { | 388 | if (check == buf) { |
| 389 | buf = 0; | 389 | buf = 0; |
| 390 | break; | 390 | break; |
| 391 | } | 391 | } |
| @@ -456,15 +456,15 @@ int patch_main(int argc UNUSED_PARAM, char **argv) | |||
| 456 | 456 | ||
| 457 | // Are we assembling a hunk? | 457 | // Are we assembling a hunk? |
| 458 | if (state >= 2) { | 458 | if (state >= 2) { |
| 459 | if (*patchline==' ' || *patchline=='+' || *patchline=='-') { | 459 | if (*patchline == ' ' || *patchline == '+' || *patchline == '-') { |
| 460 | dlist_add(&TT.current_hunk, patchline); | 460 | dlist_add(&TT.current_hunk, patchline); |
| 461 | 461 | ||
| 462 | if (*patchline != '+') TT.oldlen--; | 462 | if (*patchline != '+') TT.oldlen--; |
| 463 | if (*patchline != '-') TT.newlen--; | 463 | if (*patchline != '-') TT.newlen--; |
| 464 | 464 | ||
| 465 | // Context line? | 465 | // Context line? |
| 466 | if (*patchline==' ' && state==2) TT.context++; | 466 | if (*patchline == ' ' && state == 2) TT.context++; |
| 467 | else state=3; | 467 | else state = 3; |
| 468 | 468 | ||
| 469 | // If we've consumed all expected hunk lines, apply the hunk. | 469 | // If we've consumed all expected hunk lines, apply the hunk. |
| 470 | 470 | ||
| @@ -491,9 +491,9 @@ int patch_main(int argc UNUSED_PARAM, char **argv) | |||
| 491 | 491 | ||
| 492 | // Trim date from end of filename (if any). We don't care. | 492 | // Trim date from end of filename (if any). We don't care. |
| 493 | for (s = patchline+4; *s && *s!='\t'; s++) | 493 | for (s = patchline+4; *s && *s!='\t'; s++) |
| 494 | if (*s=='\\' && s[1]) s++; | 494 | if (*s == '\\' && s[1]) s++; |
| 495 | i = atoi(s); | 495 | i = atoi(s); |
| 496 | if (i>1900 && i<=1970) | 496 | if (i > 1900 && i <= 1970) |
| 497 | *name = xstrdup("/dev/null"); | 497 | *name = xstrdup("/dev/null"); |
| 498 | else { | 498 | else { |
| 499 | *s = 0; | 499 | *s = 0; |
| @@ -537,7 +537,7 @@ int patch_main(int argc UNUSED_PARAM, char **argv) | |||
| 537 | // handle -p path truncation. | 537 | // handle -p path truncation. |
| 538 | for (i=0, s = name; *s;) { | 538 | for (i=0, s = name; *s;) { |
| 539 | if ((option_mask32 & FLAG_PATHLEN) && TT.prefix == i) break; | 539 | if ((option_mask32 & FLAG_PATHLEN) && TT.prefix == i) break; |
| 540 | if (*(s++)=='/') { | 540 | if (*(s++) == '/') { |
| 541 | name = s; | 541 | name = s; |
| 542 | i++; | 542 | i++; |
| 543 | } | 543 | } |
diff --git a/editors/vi.c b/editors/vi.c index 1f997e8e5..2645afe87 100644 --- a/editors/vi.c +++ b/editors/vi.c | |||
| @@ -4327,7 +4327,7 @@ static void do_cmd(int c) | |||
| 4327 | c1 = get_one_char(); | 4327 | c1 = get_one_char(); |
| 4328 | // ZQ means to exit without saving | 4328 | // ZQ means to exit without saving |
| 4329 | if (c1 == 'Q') { | 4329 | if (c1 == 'Q') { |
| 4330 | editing=0; | 4330 | editing = 0; |
| 4331 | optind = cmdline_filecnt; | 4331 | optind = cmdline_filecnt; |
| 4332 | break; | 4332 | break; |
| 4333 | } | 4333 | } |
diff --git a/examples/shutdown-1.0/script/hardshutdown.c b/examples/shutdown-1.0/script/hardshutdown.c index b4af26f0f..c90f55396 100644 --- a/examples/shutdown-1.0/script/hardshutdown.c +++ b/examples/shutdown-1.0/script/hardshutdown.c | |||
| @@ -115,7 +115,7 @@ int main(int argc, char **argv) | |||
| 115 | if (ptr) | 115 | if (ptr) |
| 116 | prog = ptr+1; | 116 | prog = ptr+1; |
| 117 | 117 | ||
| 118 | for (c=1; c < argc; c++) { | 118 | for (c = 1; c < argc; c++) { |
| 119 | if (argv[c][0] >= '0' && argv[c][0] <= '9') { | 119 | if (argv[c][0] >= '0' && argv[c][0] <= '9') { |
| 120 | t.tv_sec = strtol(argv[c], NULL, 10); | 120 | t.tv_sec = strtol(argv[c], NULL, 10); |
| 121 | continue; | 121 | continue; |
| @@ -124,7 +124,7 @@ int main(int argc, char **argv) | |||
| 124 | usage(); | 124 | usage(); |
| 125 | return 1; | 125 | return 1; |
| 126 | } | 126 | } |
| 127 | for (i=1; argv[c][i]; i++) { | 127 | for (i = 1; argv[c][i]; i++) { |
| 128 | switch (argv[c][i]) { | 128 | switch (argv[c][i]) { |
| 129 | case 'h': | 129 | case 'h': |
| 130 | action = HALT; | 130 | action = HALT; |
diff --git a/miscutils/bc.c b/miscutils/bc.c index 1300a63fb..c629c4763 100644 --- a/miscutils/bc.c +++ b/miscutils/bc.c | |||
| @@ -3105,7 +3105,7 @@ static BC_STATUS zbc_lex_identifier(void) | |||
| 3105 | continue; | 3105 | continue; |
| 3106 | match: | 3106 | match: |
| 3107 | // buf starts with keyword bc_lex_kws[i] | 3107 | // buf starts with keyword bc_lex_kws[i] |
| 3108 | if (isalnum(buf[j]) || buf[j]=='_') | 3108 | if (isalnum(buf[j]) || buf[j] == '_') |
| 3109 | continue; // "ifz" does not match "if" keyword, "if." does | 3109 | continue; // "ifz" does not match "if" keyword, "if." does |
| 3110 | p->lex = BC_LEX_KEY_1st_keyword + i; | 3110 | p->lex = BC_LEX_KEY_1st_keyword + i; |
| 3111 | if (!keyword_is_POSIX(i)) { | 3111 | if (!keyword_is_POSIX(i)) { |
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c index fb9ebcf60..297693f8c 100644 --- a/miscutils/devfsd.c +++ b/miscutils/devfsd.c | |||
| @@ -976,7 +976,7 @@ static void action_compat(const struct devfsd_notify_struct *info, unsigned int | |||
| 976 | rewind_ = info->devname[info->namelen - 1]; | 976 | rewind_ = info->devname[info->namelen - 1]; |
| 977 | if (rewind_ != 'n') | 977 | if (rewind_ != 'n') |
| 978 | rewind_ = '\0'; | 978 | rewind_ = '\0'; |
| 979 | mode=0; | 979 | mode = 0; |
| 980 | if (ptr[2] == 'l' /*108*/ || ptr[2] == 'm'/*109*/) | 980 | if (ptr[2] == 'l' /*108*/ || ptr[2] == 'm'/*109*/) |
| 981 | mode = ptr[2] - 107; /* 1 or 2 */ | 981 | mode = ptr[2] - 107; /* 1 or 2 */ |
| 982 | if (ptr[2] == 'a') | 982 | if (ptr[2] == 'a') |
| @@ -1595,11 +1595,11 @@ static char *write_old_sd_name(char *buffer, | |||
| 1595 | return buffer; | 1595 | return buffer; |
| 1596 | } | 1596 | } |
| 1597 | if ((major > 64) && (major < 72)) { | 1597 | if ((major > 64) && (major < 72)) { |
| 1598 | disc_index = ((major - 64) << 4) +(minor >> 4); | 1598 | disc_index = ((major - 64) << 4) + (minor >> 4); |
| 1599 | if (disc_index < 26) | 1599 | if (disc_index < 26) |
| 1600 | sprintf(buffer, "sd%c%s", 'a' + disc_index, part); | 1600 | sprintf(buffer, "sd%c%s", 'a' + disc_index, part); |
| 1601 | else | 1601 | else |
| 1602 | sprintf(buffer, "sd%c%c%s", 'a' +(disc_index / 26) - 1, 'a' + disc_index % 26, part); | 1602 | sprintf(buffer, "sd%c%c%s", 'a' + (disc_index / 26) - 1, 'a' + disc_index % 26, part); |
| 1603 | return buffer; | 1603 | return buffer; |
| 1604 | } | 1604 | } |
| 1605 | return NULL; | 1605 | return NULL; |
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c index d8d8f6166..83e2f8d53 100644 --- a/miscutils/hdparm.c +++ b/miscutils/hdparm.c | |||
| @@ -798,7 +798,7 @@ static void identify(uint16_t *val) | |||
| 798 | if (!(val[GEN_CONFIG] & NOT_ATA)) { | 798 | if (!(val[GEN_CONFIG] & NOT_ATA)) { |
| 799 | dev = ATA_DEV; | 799 | dev = ATA_DEV; |
| 800 | printf("ATA device, with "); | 800 | printf("ATA device, with "); |
| 801 | } else if (val[GEN_CONFIG]==CFA_SUPPORT_VAL) { | 801 | } else if (val[GEN_CONFIG] == CFA_SUPPORT_VAL) { |
| 802 | dev = ATA_DEV; | 802 | dev = ATA_DEV; |
| 803 | like_std = 4; | 803 | like_std = 4; |
| 804 | printf("CompactFlash ATA device, with "); | 804 | printf("CompactFlash ATA device, with "); |
| @@ -819,13 +819,13 @@ static void identify(uint16_t *val) | |||
| 819 | * specific, it should be safe to check it now, even though we don't | 819 | * specific, it should be safe to check it now, even though we don't |
| 820 | * know yet what standard this device is using. | 820 | * know yet what standard this device is using. |
| 821 | */ | 821 | */ |
| 822 | if ((val[CONFIG]==STBY_NID_VAL) || (val[CONFIG]==STBY_ID_VAL) | 822 | if ((val[CONFIG] == STBY_NID_VAL) || (val[CONFIG] == STBY_ID_VAL) |
| 823 | || (val[CONFIG]==PWRD_NID_VAL) || (val[CONFIG]==PWRD_ID_VAL) | 823 | || (val[CONFIG] == PWRD_NID_VAL) || (val[CONFIG] == PWRD_ID_VAL) |
| 824 | ) { | 824 | ) { |
| 825 | like_std = 5; | 825 | like_std = 5; |
| 826 | if ((val[CONFIG]==STBY_NID_VAL) || (val[CONFIG]==STBY_ID_VAL)) | 826 | if ((val[CONFIG] == STBY_NID_VAL) || (val[CONFIG] == STBY_ID_VAL)) |
| 827 | puts("powers-up in standby; SET FEATURES subcmd spins-up."); | 827 | puts("powers-up in standby; SET FEATURES subcmd spins-up."); |
| 828 | if (((val[CONFIG]==STBY_NID_VAL) || (val[CONFIG]==PWRD_NID_VAL)) && (val[GEN_CONFIG] & INCOMPLETE)) | 828 | if (((val[CONFIG] == STBY_NID_VAL) || (val[CONFIG] == PWRD_NID_VAL)) && (val[GEN_CONFIG] & INCOMPLETE)) |
| 829 | puts("\n\tWARNING: ID response incomplete.\n\tFollowing data may be incorrect.\n"); | 829 | puts("\n\tWARNING: ID response incomplete.\n\tFollowing data may be incorrect.\n"); |
| 830 | } | 830 | } |
| 831 | 831 | ||
| @@ -853,7 +853,7 @@ static void identify(uint16_t *val) | |||
| 853 | printf("\n\tSupported: "); | 853 | printf("\n\tSupported: "); |
| 854 | jj = val[MAJOR] << 1; | 854 | jj = val[MAJOR] << 1; |
| 855 | kk = like_std >4 ? like_std-4: 0; | 855 | kk = like_std >4 ? like_std-4: 0; |
| 856 | for (ii = 14; (ii >0)&&(ii>kk); ii--) { | 856 | for (ii = 14; (ii > 0) && (ii > kk); ii--) { |
| 857 | if (jj & 0x8000) { | 857 | if (jj & 0x8000) { |
| 858 | printf("%u ", ii); | 858 | printf("%u ", ii); |
| 859 | if (like_std < ii) { | 859 | if (like_std < ii) { |
| @@ -943,7 +943,7 @@ static void identify(uint16_t *val) | |||
| 943 | for (ii = 1; ii < 15; ii++) { | 943 | for (ii = 1; ii < 15; ii++) { |
| 944 | if (jj & 0x0001) | 944 | if (jj & 0x0001) |
| 945 | printf("\t%s\n", nth_string(ata1_cfg_str, ii)); | 945 | printf("\t%s\n", nth_string(ata1_cfg_str, ii)); |
| 946 | jj >>=1; | 946 | jj >>= 1; |
| 947 | } | 947 | } |
| 948 | } | 948 | } |
| 949 | if (dev == ATAPI_DEV) { | 949 | if (dev == ATAPI_DEV) { |
| @@ -952,7 +952,7 @@ static void identify(uint16_t *val) | |||
| 952 | else if ((val[GEN_CONFIG] & DRQ_RESPONSE_TIME) == DRQ_INTR_VAL) | 952 | else if ((val[GEN_CONFIG] & DRQ_RESPONSE_TIME) == DRQ_INTR_VAL) |
| 953 | strng = "<=10ms with INTRQ"; | 953 | strng = "<=10ms with INTRQ"; |
| 954 | else if ((val[GEN_CONFIG] & DRQ_RESPONSE_TIME) == DRQ_50US_VAL) | 954 | else if ((val[GEN_CONFIG] & DRQ_RESPONSE_TIME) == DRQ_50US_VAL) |
| 955 | strng ="50us"; | 955 | strng = "50us"; |
| 956 | else | 956 | else |
| 957 | strng = "unknown"; | 957 | strng = "unknown"; |
| 958 | printf("\tDRQ response: %s\n\tPacket size: ", strng); /* Data Request (DRQ) */ | 958 | printf("\tDRQ response: %s\n\tPacket size: ", strng); /* Data Request (DRQ) */ |
| @@ -1014,7 +1014,7 @@ static void identify(uint16_t *val) | |||
| 1014 | } | 1014 | } |
| 1015 | 1015 | ||
| 1016 | if (!bbbig) | 1016 | if (!bbbig) |
| 1017 | bbbig = (uint64_t)(ll>mm ? ll : mm); /* # 512 byte blocks */ | 1017 | bbbig = (uint64_t)(ll > mm ? ll : mm); /* # 512 byte blocks */ |
| 1018 | printf("\tdevice size with M = 1024*1024: %11"PRIu64" MBytes\n", bbbig>>11); | 1018 | printf("\tdevice size with M = 1024*1024: %11"PRIu64" MBytes\n", bbbig>>11); |
| 1019 | bbbig = (bbbig << 9) / 1000000; | 1019 | bbbig = (bbbig << 9) / 1000000; |
| 1020 | printf("\tdevice size with M = 1000*1000: %11"PRIu64" MBytes ", bbbig); | 1020 | printf("\tdevice size with M = 1000*1000: %11"PRIu64" MBytes ", bbbig); |
| @@ -1160,7 +1160,7 @@ static void identify(uint16_t *val) | |||
| 1160 | jj = ((val[ADV_PIO_MODES] & PIO_SUP) << 3) | 0x0007; | 1160 | jj = ((val[ADV_PIO_MODES] & PIO_SUP) << 3) | 0x0007; |
| 1161 | for (ii = 0; ii <= PIO_MODE_MAX; ii++) { | 1161 | for (ii = 0; ii <= PIO_MODE_MAX; ii++) { |
| 1162 | if (jj & 0x0001) printf("pio%d ", ii); | 1162 | if (jj & 0x0001) printf("pio%d ", ii); |
| 1163 | jj >>=1; | 1163 | jj >>= 1; |
| 1164 | } | 1164 | } |
| 1165 | bb_putchar('\n'); | 1165 | bb_putchar('\n'); |
| 1166 | } else if (((min_std < 5) || (eqpt == CDROM)) && (val[PIO_MODE] & MODE)) { | 1166 | } else if (((min_std < 5) || (eqpt == CDROM)) && (val[PIO_MODE] & MODE)) { |
| @@ -1199,7 +1199,7 @@ static void identify(uint16_t *val) | |||
| 1199 | } | 1199 | } |
| 1200 | if (ii == 31) { | 1200 | if (ii == 31) { |
| 1201 | if ((val[CMDS_SUPP_2] & VALID) != VALID_VAL) | 1201 | if ((val[CMDS_SUPP_2] & VALID) != VALID_VAL) |
| 1202 | ii +=16; | 1202 | ii += 16; |
| 1203 | } | 1203 | } |
| 1204 | } | 1204 | } |
| 1205 | } | 1205 | } |
| @@ -1220,7 +1220,7 @@ static void identify(uint16_t *val) | |||
| 1220 | printf("\t%s\t%s\n", | 1220 | printf("\t%s\t%s\n", |
| 1221 | (!(jj & 0x0001)) ? "not" : "", | 1221 | (!(jj & 0x0001)) ? "not" : "", |
| 1222 | nth_string(secu_str, ii)); | 1222 | nth_string(secu_str, ii)); |
| 1223 | jj >>=1; | 1223 | jj >>= 1; |
| 1224 | } | 1224 | } |
| 1225 | if (val[SECU_STATUS] & SECU_ENABLED) { | 1225 | if (val[SECU_STATUS] & SECU_ENABLED) { |
| 1226 | printf("\tSecurity level %s\n", | 1226 | printf("\tSecurity level %s\n", |
diff --git a/modutils/modutils-24.c b/modutils/modutils-24.c index d0bc2a6ef..37c303f90 100644 --- a/modutils/modutils-24.c +++ b/modutils/modutils-24.c | |||
| @@ -981,7 +981,7 @@ arch_apply_relocation(struct obj_file *f, | |||
| 981 | (loc[1] & 0xFFFF); | 981 | (loc[1] & 0xFFFF); |
| 982 | 982 | ||
| 983 | /* Add reloc offset */ | 983 | /* Add reloc offset */ |
| 984 | temp1+=v; | 984 | temp1 += v; |
| 985 | 985 | ||
| 986 | /* Store back into code */ | 986 | /* Store back into code */ |
| 987 | loc[0] = (loc[0] & 0xFFFF0000) | temp1 >> 16; | 987 | loc[0] = (loc[0] & 0xFFFF0000) | temp1 >> 16; |
diff --git a/networking/tc.c b/networking/tc.c index 46ad23d8b..43187f7ee 100644 --- a/networking/tc.c +++ b/networking/tc.c | |||
| @@ -214,7 +214,7 @@ static int prio_print_opt(struct rtattr *opt) | |||
| 214 | return 0; | 214 | return 0; |
| 215 | parse_rtattr_nested_compat(tb, TCA_PRIO_MAX, opt, qopt, sizeof(*qopt)); | 215 | parse_rtattr_nested_compat(tb, TCA_PRIO_MAX, opt, qopt, sizeof(*qopt)); |
| 216 | printf("bands %u priomap ", qopt->bands); | 216 | printf("bands %u priomap ", qopt->bands); |
| 217 | for (i=0; i<=TC_PRIO_MAX; i++) | 217 | for (i = 0; i <= TC_PRIO_MAX; i++) |
| 218 | printf(" %d", qopt->priomap[i]); | 218 | printf(" %d", qopt->priomap[i]); |
| 219 | 219 | ||
| 220 | if (tb[TCA_PRIO_MQ]) | 220 | if (tb[TCA_PRIO_MQ]) |
diff --git a/procps/nmeter.c b/procps/nmeter.c index 088d366bf..68e6f3325 100644 --- a/procps/nmeter.c +++ b/procps/nmeter.c | |||
| @@ -515,7 +515,7 @@ static void FAST_FUNC collect_blk(blk_stat *s) | |||
| 515 | return; | 515 | return; |
| 516 | } | 516 | } |
| 517 | 517 | ||
| 518 | for (i=0; i<2; i++) { | 518 | for (i = 0; i < 2; i++) { |
| 519 | ullong old = s->old[i]; | 519 | ullong old = s->old[i]; |
| 520 | if (data[i] < old) old = data[i]; //sanitize | 520 | if (data[i] < old) old = data[i]; //sanitize |
| 521 | s->old[i] = data[i]; | 521 | s->old[i] = data[i]; |
| @@ -597,7 +597,7 @@ static void FAST_FUNC collect_if(if_stat *s) | |||
| 597 | return; | 597 | return; |
| 598 | } | 598 | } |
| 599 | 599 | ||
| 600 | for (i=0; i<4; i++) { | 600 | for (i = 0; i < 4; i++) { |
| 601 | ullong old = s->old[i]; | 601 | ullong old = s->old[i]; |
| 602 | if (data[i] < old) old = data[i]; //sanitize | 602 | if (data[i] < old) old = data[i]; //sanitize |
| 603 | s->old[i] = data[i]; | 603 | s->old[i] = data[i]; |
