Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2022-08-30 17:41:17 +0300
committerDenys Vlasenko <vda.linux@googlemail.com>2022-08-30 17:41:17 +0300
commitfe73c8d55795a8fe7e95fc2c00af6899817b96b8 (patch)
tree1b772243f00c63d16ee4cf8bf6f80a6c7a53ee91 /miscutils
parent58598eb7093561d914a6254697e137b815f1fdfc (diff)
*: style fix
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/bc.c2
-rw-r--r--miscutils/devfsd.c6
-rw-r--r--miscutils/hdparm.c24
3 files changed, 16 insertions, 16 deletions
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)
continue;
match:
// buf starts with keyword bc_lex_kws[i]
- if (isalnum(buf[j]) || buf[j]=='_')
+ if (isalnum(buf[j]) || buf[j] == '_')
continue; // "ifz" does not match "if" keyword, "if." does
p->lex = BC_LEX_KEY_1st_keyword + i;
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
rewind_ = info->devname[info->namelen - 1];
if (rewind_ != 'n')
rewind_ = '\0';
- mode=0;
+ mode = 0;
if (ptr[2] == 'l' /*108*/ || ptr[2] == 'm'/*109*/)
mode = ptr[2] - 107; /* 1 or 2 */
if (ptr[2] == 'a')
@@ -1595,11 +1595,11 @@ static char *write_old_sd_name(char *buffer,
return buffer;
}
if ((major > 64) && (major < 72)) {
- disc_index = ((major - 64) << 4) +(minor >> 4);
+ disc_index = ((major - 64) << 4) + (minor >> 4);
if (disc_index < 26)
sprintf(buffer, "sd%c%s", 'a' + disc_index, part);
else
- sprintf(buffer, "sd%c%c%s", 'a' +(disc_index / 26) - 1, 'a' + disc_index % 26, part);
+ sprintf(buffer, "sd%c%c%s", 'a' + (disc_index / 26) - 1, 'a' + disc_index % 26, part);
return buffer;
}
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)
if (!(val[GEN_CONFIG] & NOT_ATA)) {
dev = ATA_DEV;
printf("ATA device, with ");
- } else if (val[GEN_CONFIG]==CFA_SUPPORT_VAL) {
+ } else if (val[GEN_CONFIG] == CFA_SUPPORT_VAL) {
dev = ATA_DEV;
like_std = 4;
printf("CompactFlash ATA device, with ");
@@ -819,13 +819,13 @@ static void identify(uint16_t *val)
* specific, it should be safe to check it now, even though we don't
* know yet what standard this device is using.
*/
- if ((val[CONFIG]==STBY_NID_VAL) || (val[CONFIG]==STBY_ID_VAL)
- || (val[CONFIG]==PWRD_NID_VAL) || (val[CONFIG]==PWRD_ID_VAL)
+ if ((val[CONFIG] == STBY_NID_VAL) || (val[CONFIG] == STBY_ID_VAL)
+ || (val[CONFIG] == PWRD_NID_VAL) || (val[CONFIG] == PWRD_ID_VAL)
) {
like_std = 5;
- if ((val[CONFIG]==STBY_NID_VAL) || (val[CONFIG]==STBY_ID_VAL))
+ if ((val[CONFIG] == STBY_NID_VAL) || (val[CONFIG] == STBY_ID_VAL))
puts("powers-up in standby; SET FEATURES subcmd spins-up.");
- if (((val[CONFIG]==STBY_NID_VAL) || (val[CONFIG]==PWRD_NID_VAL)) && (val[GEN_CONFIG] & INCOMPLETE))
+ if (((val[CONFIG] == STBY_NID_VAL) || (val[CONFIG] == PWRD_NID_VAL)) && (val[GEN_CONFIG] & INCOMPLETE))
puts("\n\tWARNING: ID response incomplete.\n\tFollowing data may be incorrect.\n");
}
@@ -853,7 +853,7 @@ static void identify(uint16_t *val)
printf("\n\tSupported: ");
jj = val[MAJOR] << 1;
kk = like_std >4 ? like_std-4: 0;
- for (ii = 14; (ii >0)&&(ii>kk); ii--) {
+ for (ii = 14; (ii > 0) && (ii > kk); ii--) {
if (jj & 0x8000) {
printf("%u ", ii);
if (like_std < ii) {
@@ -943,7 +943,7 @@ static void identify(uint16_t *val)
for (ii = 1; ii < 15; ii++) {
if (jj & 0x0001)
printf("\t%s\n", nth_string(ata1_cfg_str, ii));
- jj >>=1;
+ jj >>= 1;
}
}
if (dev == ATAPI_DEV) {
@@ -952,7 +952,7 @@ static void identify(uint16_t *val)
else if ((val[GEN_CONFIG] & DRQ_RESPONSE_TIME) == DRQ_INTR_VAL)
strng = "<=10ms with INTRQ";
else if ((val[GEN_CONFIG] & DRQ_RESPONSE_TIME) == DRQ_50US_VAL)
- strng ="50us";
+ strng = "50us";
else
strng = "unknown";
printf("\tDRQ response: %s\n\tPacket size: ", strng); /* Data Request (DRQ) */
@@ -1014,7 +1014,7 @@ static void identify(uint16_t *val)
}
if (!bbbig)
- bbbig = (uint64_t)(ll>mm ? ll : mm); /* # 512 byte blocks */
+ bbbig = (uint64_t)(ll > mm ? ll : mm); /* # 512 byte blocks */
printf("\tdevice size with M = 1024*1024: %11"PRIu64" MBytes\n", bbbig>>11);
bbbig = (bbbig << 9) / 1000000;
printf("\tdevice size with M = 1000*1000: %11"PRIu64" MBytes ", bbbig);
@@ -1160,7 +1160,7 @@ static void identify(uint16_t *val)
jj = ((val[ADV_PIO_MODES] & PIO_SUP) << 3) | 0x0007;
for (ii = 0; ii <= PIO_MODE_MAX; ii++) {
if (jj & 0x0001) printf("pio%d ", ii);
- jj >>=1;
+ jj >>= 1;
}
bb_putchar('\n');
} else if (((min_std < 5) || (eqpt == CDROM)) && (val[PIO_MODE] & MODE)) {
@@ -1199,7 +1199,7 @@ static void identify(uint16_t *val)
}
if (ii == 31) {
if ((val[CMDS_SUPP_2] & VALID) != VALID_VAL)
- ii +=16;
+ ii += 16;
}
}
}
@@ -1220,7 +1220,7 @@ static void identify(uint16_t *val)
printf("\t%s\t%s\n",
(!(jj & 0x0001)) ? "not" : "",
nth_string(secu_str, ii));
- jj >>=1;
+ jj >>= 1;
}
if (val[SECU_STATUS] & SECU_ENABLED) {
printf("\tSecurity level %s\n",