whitespace cleanup

This commit is contained in:
Denis Vlasenko 2006-09-17 16:28:10 +00:00
parent a6127aacef
commit 9213a9e0f2
92 changed files with 218 additions and 218 deletions

View File

@ -1316,8 +1316,8 @@ static void list_packages(void)
/* go through status hash, dereference package hash and finally strings */
for (i=0; i<STATUS_HASH_PRIME+1; i++) {
if (status_hashtable[i]) {
const char *stat_str; /* status string */
if (status_hashtable[i]) {
const char *stat_str; /* status string */
const char *name_str; /* package name */
const char *vers_str; /* version */
char s1, s2; /* status abbreviations */
@ -1333,7 +1333,7 @@ static void list_packages(void)
/* get abbreviation for status field 2 */
for (j=0, spccnt=0; stat_str[j] && spccnt<2; j++) {
if (stat_str[j] == ' ') spccnt++;
if (stat_str[j] == ' ') spccnt++;
}
s2 = stat_str[j];

View File

@ -33,7 +33,7 @@ static const char days_in_month[] = {
};
static const char sep1752[] = {
1, 2, 14, 15, 16,
1, 2, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30
};

View File

@ -77,7 +77,7 @@ int cp_main(int argc, char **argv)
/* If there are only two arguments and... */
if (optind + 2 == argc) {
s_flags = cp_mv_stat2(*argv, &source_stat,
(flags & FILEUTILS_DEREFERENCE) ? stat : lstat);
(flags & FILEUTILS_DEREFERENCE) ? stat : lstat);
if ((s_flags < 0) || ((d_flags = cp_mv_stat(last, &dest_stat)) < 0)) {
exit(EXIT_FAILURE);
}

View File

@ -196,7 +196,7 @@ static struct dnode *my_stat(char *fullname, char *name)
#endif
{
#ifdef CONFIG_SELINUX
if (is_selinux_enabled()) {
if (is_selinux_enabled()) {
lgetfilecon(fullname,&sid);
}
#endif

View File

@ -26,14 +26,14 @@ static void print_user(unsigned short uid, FILE *f)
{
struct passwd *pw = getpwuid(uid);
fprintf(f, "%u (user %s)\n", uid,
(pw == NULL ? "unknown" : pw->pw_name));
(pw == NULL ? "unknown" : pw->pw_name));
}
static void print_group(unsigned short gid, FILE *f)
{
struct group *gr = getgrgid(gid);
fprintf(f, "%u (group %s)\n", gid,
(gr == NULL ? "unknown" : gr->gr_name));
(gr == NULL ? "unknown" : gr->gr_name));
}
#define MONTH_INT (86400 * 30)

View File

@ -737,7 +737,7 @@ static void parse_extended_opts(struct ext2_super_block *sb_param,
}
if (resize <= sb_param->s_blocks_count) {
bb_error_msg("The resize maximum must be greater "
"than the filesystem size");
"than the filesystem size");
r_usage++;
continue;
}

View File

@ -780,7 +780,7 @@ restart:
|| (sed_cmd->beg_line > 0 && (sed_cmd->beg_line == linenum))
/* Or does this line match our begin address regex? */
|| (sed_cmd->beg_match &&
|| (sed_cmd->beg_match &&
!regexec(sed_cmd->beg_match, pattern_space, 0, NULL, 0))
/* Or did we match last line of input? */

View File

@ -3923,4 +3923,4 @@ static void crash_test()
}
return;
}
#endif /* CONFIG_FEATURE_VI_CRASHME */
#endif /* CONFIG_FEATURE_VI_CRASHME */

View File

@ -11,7 +11,7 @@
#undef __GNUC_PREREQ
#if defined __GNUC__ && defined __GNUC_MINOR__
# define __GNUC_PREREQ(maj, min) \
((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
#else
# define __GNUC_PREREQ(maj, min) 0
#endif

View File

@ -499,9 +499,9 @@ USE_FEATURE_DATE_ISOFMT( \
"\t-s SIZE\t\tUse a buffer of size SIZE"
#define dnsd_trivial_usage \
"[-c config] [-t seconds] [-p port] [-i iface-ip] [-d]"
"[-c config] [-t seconds] [-p port] [-i iface-ip] [-d]"
#define dnsd_full_usage \
"Small and static DNS server daemon\n\n" \
"Small and static DNS server daemon\n\n" \
"Options:\n" \
"\t-c\t\tconfig filename\n" \
"\t-t\t\tTTL in seconds\n" \

View File

@ -16,12 +16,12 @@ static struct signal_name {
// SUSv3 says kill must support these, and specifies the numerical values,
// http://www.opengroup.org/onlinepubs/009695399/utilities/kill.html
{"0", 0}, {"HUP", 1}, {"INT", 2}, {"QUIT", 3}, {"ABRT", 6}, {"KILL", 9},
{"ALRM", 14}, {"TERM", 15},
{"ALRM", 14}, {"TERM", 15},
// And Posix adds the following:
{"ILL", SIGILL}, {"TRAP", SIGTRAP}, {"FPE", SIGFPE}, {"USR1", SIGUSR1},
{"SEGV", SIGSEGV}, {"USR2", SIGUSR2}, {"PIPE", SIGPIPE}, {"CHLD", SIGCHLD},
{"CONT", SIGCONT}, {"STOP", SIGSTOP}, {"TSTP", SIGTSTP}, {"TTIN", SIGTTIN},
{"TTOU", SIGTTOU}
{"SEGV", SIGSEGV}, {"USR2", SIGUSR2}, {"PIPE", SIGPIPE}, {"CHLD", SIGCHLD},
{"CONT", SIGCONT}, {"STOP", SIGSTOP}, {"TSTP", SIGTSTP}, {"TTIN", SIGTTIN},
{"TTOU", SIGTTOU}
};
// Convert signal name to number.

View File

@ -489,8 +489,8 @@ void xlisten(int s, int backlog)
// xstat() - a stat() which dies on failure with meaningful error message
void xstat(char *name, struct stat *stat_buf)
{
if (stat(name, stat_buf))
bb_perror_msg_and_die("Can't stat '%s'", name);
if (stat(name, stat_buf))
bb_perror_msg_and_die("Can't stat '%s'", name);
}
#endif

View File

@ -137,8 +137,8 @@ static int adduser(struct passwd *p, unsigned long flags)
if (mkdir(p->pw_dir, 0755)
|| chown(p->pw_dir, p->pw_uid, p->pw_gid)
|| chmod(p->pw_dir, 02755)) {
bb_perror_msg("%s", p->pw_dir);
}
bb_perror_msg("%s", p->pw_dir);
}
}
if (!(flags & DONT_SET_PASS)) {
@ -175,7 +175,7 @@ int adduser_main(int argc, char **argv)
/* got root? */
if(geteuid()) {
bb_error_msg_and_die(bb_msg_perm_denied_are_you_root);
}
}
/* create string for $HOME if not specified already */
if (!pw.pw_dir) {

View File

@ -1201,7 +1201,7 @@ static void dump_identity(const struct hd_driveid *id)
printf(" CurCHS=%u/%u/%u, CurSects=%lu, LBA=%s",id->cur_cyls, id->cur_heads,
id->cur_sectors,
(BB_BIG_ENDIAN) ?
(BB_BIG_ENDIAN) ?
(long unsigned int)(id->cur_capacity0 << 16) | id->cur_capacity1 :
(long unsigned int)(id->cur_capacity1 << 16) | id->cur_capacity0,
((id->capability&2) == 0) ? "no" : "yes");

View File

@ -36,7 +36,7 @@ void filename2modname(char *modname, const char *afterslash);
// There really should be a header file for this...
int query_module(const char *name, int which, void *buf,
size_t bufsize, size_t *ret);
size_t bufsize, size_t *ret);
int rmmod_main(int argc, char **argv)
{

View File

@ -370,7 +370,7 @@ static void ping(const char *host)
pingaddr.sin6_scope_id = if_index;
printf("PING %s (%s): %d data bytes\n",
hostent->h_name,
hostent->h_name,
inet_ntop(AF_INET6, &pingaddr.sin6_addr,
buf, sizeof(buf)),
datalen);

View File

@ -185,9 +185,9 @@ static void handlenetoutput(int len)
* I don't agree.
* first - I cannot use programs like sz/rz
* second - the 0x0D is sent as one character and if the next
* char is 0x0A then it's eaten by a server side.
* char is 0x0A then it's eaten by a server side.
* third - whay doy you have to make 'many write()s'?
* I don't understand.
* I don't understand.
* So I implemented it. It's realy useful for me. I hope that
* others people will find it interesting to.
*/

View File

@ -305,7 +305,7 @@ dialog_menu (const char *title, const char *prompt, int height, int width,
if (key == KEY_UP || key == '-') {
if (choice < 2 && scroll) {
/* Scroll menu down */
/* Scroll menu down */
scrollok (menu, TRUE);
wscrl (menu, -1);
scrollok (menu, FALSE);
@ -339,7 +339,7 @@ dialog_menu (const char *title, const char *prompt, int height, int width,
choice = MIN(choice+1, max_choice-1);
} else if (key == KEY_PPAGE) {
scrollok (menu, TRUE);
scrollok (menu, TRUE);
for (i=0; (i < max_choice); i++) {
if (scroll > 0) {
wscrl (menu, -1);
@ -361,8 +361,8 @@ dialog_menu (const char *title, const char *prompt, int height, int width,
scrollok (menu, FALSE);
scroll++;
print_item (menu, items[scroll + max_choice - 1]->name,
max_choice-1, FALSE,
(items[scroll + max_choice - 1]->tag[0] != ':'));
max_choice-1, FALSE,
(items[scroll + max_choice - 1]->tag[0] != ':'));
} else {
if (choice+1 < max_choice)
choice++;

View File

@ -224,7 +224,7 @@ print_autowrap (WINDOW * win, const char *prompt, int width, int y, int x)
while (word && *word) {
sp = strchr(word, ' ');
if (sp)
*sp++ = 0;
*sp++ = 0;
/* Wrap to next line if either the word does not fit,
or it is the first word of a new sentence, and it is
@ -242,11 +242,11 @@ print_autowrap (WINDOW * win, const char *prompt, int width, int y, int x)
getyx (win, cur_y, cur_x);
cur_x++;
if (sp && *sp == ' ') {
cur_x++; /* double space */
cur_x++; /* double space */
while (*++sp == ' ');
newl = 1;
} else
newl = 0;
newl = 0;
word = sp;
}
}

View File

@ -408,7 +408,7 @@ static void get_symbol_str(struct gstr *r, struct symbol *sym)
struct property *prop;
str_printf(r, "Symbol: %s [=%s]\n", sym->name,
sym_get_string_value(sym));
sym_get_string_value(sym));
for_all_prompts(sym, prop)
get_prompt_str(r, prop);
hit = false;

View File

@ -185,7 +185,7 @@ void sym_check_prop(struct symbol *sym)
case P_RANGE:
if (sym->type != S_INT && sym->type != S_HEX)
prop_warn(prop, "range is only allowed "
"for int or hex symbols");
"for int or hex symbols");
if (!sym_string_valid(sym, prop->expr->left.sym->name) ||
!sym_string_valid(sym, prop->expr->right.sym->name))
prop_warn(prop, "range is invalid");

View File

@ -1914,9 +1914,9 @@ sgi_set_swappartition(int i)
static int
sgi_check_bootfile(const char* aFile)
{
if (strlen(aFile) < 3) /* "/a\n" is minimum */ {
printf(_("\nInvalid Bootfile!\n"
"\tThe bootfile must be an absolute non-zero pathname,\n"
if (strlen(aFile) < 3) /* "/a\n" is minimum */ {
printf(_("\nInvalid Bootfile!\n"
"\tThe bootfile must be an absolute non-zero pathname,\n"
"\te.g. \"/unix\" or \"/unix.save\".\n"));
return 0;
} else {
@ -1931,7 +1931,7 @@ sgi_check_bootfile(const char* aFile)
return 0;
}
}
}
}
if (strncmp(aFile, (char*)sgilabel->boot_file, 16)) {
printf(_("\n\tBe aware, that the bootfile is not checked for existence.\n\t"
"SGI's default is \"/unix\" and for backup \"/unix.save\".\n"));

View File

@ -66,9 +66,9 @@ int hexdump_main(int argc, char **argv)
bb_dump_add(add_first);
bb_dump_add(add_strings[(int)(p - hexdump_opts)]);
} else if (ch == 'C') {
bb_dump_add("\"%08.8_Ax\n\"");
bb_dump_add("\"%08.8_Ax\n\"");
bb_dump_add("\"%08.8_ax \" 8/1 \"%02x \" \" \" 8/1 \"%02x \" ");
bb_dump_add("\" |\" 16/1 \"%_p\" \"|\\n\"");
bb_dump_add("\" |\" 16/1 \"%_p\" \"|\\n\"");
} else {
/* Sae a little bit of space below by omitting the 'else's. */
if (ch == 'e') {

View File

@ -138,7 +138,7 @@ static void make_device(char *path, int delete)
// Command to run
char *s = "@$*", *s2;
if (!(s2 = strchr(s, *pos++))) {
// Force error
// Force error
field = 1;
break;
}

View File

@ -1315,7 +1315,7 @@ static int singlemount(struct mntent *mp, int ignore_busy)
s = strrchr(mp->mnt_fsname, '\\');
if (s == mp->mnt_fsname+1) goto report_error;
*s = 0;
he = gethostbyname(mp->mnt_fsname+2);
he = gethostbyname(mp->mnt_fsname+2);
*s = '\\';
if (!he) goto report_error;