random style fixes (extra spaces deleted)
This commit is contained in:
parent
644849a3aa
commit
219d14d514
@ -3393,7 +3393,7 @@ static void do_cmd(char c)
|
|||||||
editing = 0;
|
editing = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (strncasecmp(p, "file", cnt) == 0 ) {
|
} else if (strncasecmp(p, "file", cnt) == 0) {
|
||||||
last_status_cksum = 0; // force status update
|
last_status_cksum = 0; // force status update
|
||||||
} else if (sscanf(p, "%d", &j) > 0) {
|
} else if (sscanf(p, "%d", &j) > 0) {
|
||||||
dot = find_line(j); // go to line # j
|
dot = find_line(j); // go to line # j
|
||||||
|
@ -880,8 +880,7 @@ static void reload_signal(int sig ATTRIBUTE_UNUSED)
|
|||||||
/* remove unused entrys */
|
/* remove unused entrys */
|
||||||
for (a = init_action_list; a; a = tmp) {
|
for (a = init_action_list; a; a = tmp) {
|
||||||
tmp = a->next;
|
tmp = a->next;
|
||||||
if (a->action & (ONCE | SYSINIT | WAIT ) &&
|
if ((a->action & (ONCE | SYSINIT | WAIT)) && a->pid == 0) {
|
||||||
a->pid == 0 ) {
|
|
||||||
delete_init_action(a);
|
delete_init_action(a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
/* internal function for bb_getpwuid and bb_getgrgid */
|
/* internal function for bb_getpwuid and bb_getgrgid */
|
||||||
static char* bb_getug(char *buffer, char *idname, long id, int bufsize, char prefix)
|
static char* bb_getug(char *buffer, char *idname, long id, int bufsize, char prefix)
|
||||||
{
|
{
|
||||||
if (bufsize > 0 ) {
|
if (bufsize > 0) {
|
||||||
assert(buffer != NULL);
|
assert(buffer != NULL);
|
||||||
if (idname) {
|
if (idname) {
|
||||||
return safe_strncpy(buffer, idname, bufsize);
|
return safe_strncpy(buffer, idname, bufsize);
|
||||||
|
@ -72,8 +72,8 @@ const char *make_human_readable_str(unsigned long long size,
|
|||||||
}
|
}
|
||||||
#if 0
|
#if 0
|
||||||
/* Sample code to omit decimal point and tenths digit. */
|
/* Sample code to omit decimal point and tenths digit. */
|
||||||
if ( /* no_tenths */ 1 ) {
|
if (/* no_tenths */ 1) {
|
||||||
if ( frac >= 5 ) {
|
if (frac >= 5) {
|
||||||
++val;
|
++val;
|
||||||
}
|
}
|
||||||
f = "%llu%*c" /* fmt_no_tenths */ ;
|
f = "%llu%*c" /* fmt_no_tenths */ ;
|
||||||
|
@ -188,7 +188,7 @@ static void handlenetoutput(int len)
|
|||||||
else if (*p == 0x0d)
|
else if (*p == 0x0d)
|
||||||
outbuf[j++] = 0x00;
|
outbuf[j++] = 0x00;
|
||||||
}
|
}
|
||||||
if (j > 0 )
|
if (j > 0)
|
||||||
write(G.netfd, outbuf, j);
|
write(G.netfd, outbuf, j);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,9 +94,11 @@ int arpping(uint32_t yiaddr, uint32_t ip, uint8_t *mac, char *interface)
|
|||||||
tm.tv_sec = timeout;
|
tm.tv_sec = timeout;
|
||||||
if (select(s + 1, &fdset, (fd_set *) NULL, (fd_set *) NULL, &tm) < 0) {
|
if (select(s + 1, &fdset, (fd_set *) NULL, (fd_set *) NULL, &tm) < 0) {
|
||||||
bb_perror_msg("error on ARPING request");
|
bb_perror_msg("error on ARPING request");
|
||||||
if (errno != EINTR) rv = 0;
|
if (errno != EINTR)
|
||||||
|
rv = 0;
|
||||||
} else if (FD_ISSET(s, &fdset)) {
|
} else if (FD_ISSET(s, &fdset)) {
|
||||||
if (recv(s, &arp, sizeof(arp), 0) < 0 ) rv = 0;
|
if (recv(s, &arp, sizeof(arp), 0) < 0)
|
||||||
|
rv = 0;
|
||||||
if (arp.operation == htons(ARPOP_REPLY) &&
|
if (arp.operation == htons(ARPOP_REPLY) &&
|
||||||
memcmp(arp.tHaddr, mac, 6) == 0 &&
|
memcmp(arp.tHaddr, mac, 6) == 0 &&
|
||||||
*((uint32_t *) arp.sInaddr) == yiaddr) {
|
*((uint32_t *) arp.sInaddr) == yiaddr) {
|
||||||
|
@ -18,10 +18,10 @@ int free_main(int argc, char **argv)
|
|||||||
sysinfo(&info);
|
sysinfo(&info);
|
||||||
|
|
||||||
/* Kernels prior to 2.4.x will return info.mem_unit==0, so cope... */
|
/* Kernels prior to 2.4.x will return info.mem_unit==0, so cope... */
|
||||||
if (info.mem_unit==0) {
|
if (info.mem_unit == 0) {
|
||||||
info.mem_unit=1;
|
info.mem_unit=1;
|
||||||
}
|
}
|
||||||
if ( info.mem_unit == 1 ) {
|
if (info.mem_unit == 1) {
|
||||||
info.mem_unit=1024;
|
info.mem_unit=1024;
|
||||||
|
|
||||||
/* TODO: Make all this stuff not overflow when mem >= 4 Gib */
|
/* TODO: Make all this stuff not overflow when mem >= 4 Gib */
|
||||||
@ -46,7 +46,7 @@ int free_main(int argc, char **argv)
|
|||||||
info.bufferram*=info.mem_unit;
|
info.bufferram*=info.mem_unit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argc > 1 && **(argv + 1) == '-')
|
if (argc > 1 && *argv[1] == '-')
|
||||||
bb_show_usage();
|
bb_show_usage();
|
||||||
|
|
||||||
printf("%6s%13s%13s%13s%13s%13s\n", "", "total", "used", "free",
|
printf("%6s%13s%13s%13s%13s%13s\n", "", "total", "used", "free",
|
||||||
@ -66,4 +66,3 @@ int free_main(int argc, char **argv)
|
|||||||
#endif
|
#endif
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1095,7 +1095,7 @@ static void pseudo_exec(struct child_prog *child)
|
|||||||
* if this is one of those cases.
|
* if this is one of those cases.
|
||||||
*/
|
*/
|
||||||
for (x = bltins; x->cmd; x++) {
|
for (x = bltins; x->cmd; x++) {
|
||||||
if (strcmp(child->argv[0], x->cmd) == 0 ) {
|
if (strcmp(child->argv[0], x->cmd) == 0) {
|
||||||
debug_printf("builtin exec %s\n", child->argv[0]);
|
debug_printf("builtin exec %s\n", child->argv[0]);
|
||||||
rcode = x->function(child);
|
rcode = x->function(child);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
@ -1369,7 +1369,7 @@ static int run_pipe_real(struct pipe *pi)
|
|||||||
return last_return_code;
|
return last_return_code;
|
||||||
}
|
}
|
||||||
for (x = bltins; x->cmd; x++) {
|
for (x = bltins; x->cmd; x++) {
|
||||||
if (strcmp(child->argv[i], x->cmd) == 0 ) {
|
if (strcmp(child->argv[i], x->cmd) == 0) {
|
||||||
int squirrel[] = { -1, -1, -1 };
|
int squirrel[] = { -1, -1, -1 };
|
||||||
int rcode;
|
int rcode;
|
||||||
if (x->function == builtin_exec && child->argv[i+1] == NULL) {
|
if (x->function == builtin_exec && child->argv[i+1] == NULL) {
|
||||||
|
@ -1138,7 +1138,7 @@ static int pseudo_exec(struct child_prog *child)
|
|||||||
* if this is one of those cases.
|
* if this is one of those cases.
|
||||||
*/
|
*/
|
||||||
for (x = bltins; x->cmd; x++) {
|
for (x = bltins; x->cmd; x++) {
|
||||||
if (strcmp(child->argv[0], x->cmd) == 0 ) {
|
if (strcmp(child->argv[0], x->cmd) == 0) {
|
||||||
_exit(x->function(child));
|
_exit(x->function(child));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1262,7 +1262,7 @@ static int run_command(struct job *newjob, int inbg, int outpipe[2])
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (x = bltins; x->cmd; x++) {
|
for (x = bltins; x->cmd; x++) {
|
||||||
if (strcmp(child->argv[0], x->cmd) == 0 ) {
|
if (strcmp(child->argv[0], x->cmd) == 0) {
|
||||||
int rcode;
|
int rcode;
|
||||||
int squirrel[] = {-1, -1, -1};
|
int squirrel[] = {-1, -1, -1};
|
||||||
setup_redirects(child, squirrel);
|
setup_redirects(child, squirrel);
|
||||||
|
@ -613,7 +613,7 @@ sgi_gaps(void)
|
|||||||
static void
|
static void
|
||||||
sgi_change_sysid(int i, int sys)
|
sgi_change_sysid(int i, int sys)
|
||||||
{
|
{
|
||||||
if (sgi_get_num_sectors(i) == 0 ) { /* caught already before, ... */
|
if (sgi_get_num_sectors(i) == 0) { /* caught already before, ... */
|
||||||
printf("Sorry you may change the Tag of non-empty partitions\n");
|
printf("Sorry you may change the Tag of non-empty partitions\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ static time_t read_rtc(int utc)
|
|||||||
int rtc = xopen_rtc(O_RDONLY);
|
int rtc = xopen_rtc(O_RDONLY);
|
||||||
|
|
||||||
memset(&tm, 0, sizeof(struct tm));
|
memset(&tm, 0, sizeof(struct tm));
|
||||||
if (ioctl(rtc, RTC_RD_TIME, &tm) < 0 )
|
if (ioctl(rtc, RTC_RD_TIME, &tm) < 0)
|
||||||
bb_perror_msg_and_die("cannot read time from RTC");
|
bb_perror_msg_and_die("cannot read time from RTC");
|
||||||
tm.tm_isdst = -1; /* not known */
|
tm.tm_isdst = -1; /* not known */
|
||||||
|
|
||||||
@ -165,7 +165,7 @@ static int check_utc(void)
|
|||||||
|
|
||||||
buffer[len] = 0;
|
buffer[len] = 0;
|
||||||
|
|
||||||
if (strncmp(buffer, "UTC", 3) == 0 ) {
|
if (strncmp(buffer, "UTC", 3) == 0) {
|
||||||
utc = 1;
|
utc = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user