sort(1): Whitespace and style cleanup

No functional change.

Sponsored by:	Dell EMC Isilon
This commit is contained in:
Conrad Meyer 2019-04-11 00:39:06 +00:00
parent 745598d472
commit 74504eefa1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=346110

View File

@ -566,7 +566,9 @@ static bool
set_sort_modifier(struct sort_mods *sm, int c)
{
if (sm) {
if (sm == NULL)
return (true);
switch (c){
case 'b':
sm->bflag = true;
@ -610,11 +612,11 @@ set_sort_modifier(struct sort_mods *sm, int c)
print_symbols_on_debug = true;
break;
default:
return false;
return (false);
}
sort_opts_vals.complex_sort = true;
sm->func = get_sort_func(sm);
}
return (true);
}
@ -910,8 +912,6 @@ fix_obsolete_keys(int *argc, char **argv)
static void
set_random_seed(void)
{
if (need_random) {
if (strcmp(random_source, DEFAULT_RANDOM_SORT_SEED_FILE) == 0) {
FILE* fseed;
MD5_CTX ctx;
@ -952,13 +952,11 @@ set_random_seed(void)
random_seed = b;
random_seed_size = strlen(b);
}
MD5Init(&md5_ctx);
if(random_seed_size>0) {
MD5Update(&md5_ctx, random_seed, random_seed_size);
}
}
}
/*
* Main function.
@ -1226,6 +1224,7 @@ main(int argc, char **argv)
}
}
if (need_random)
set_random_seed();
/* Case when the outfile equals one of the input files: */