diff --git a/usr.bin/sort/bwstring.c b/usr.bin/sort/bwstring.c index 20587de10677..9ebeb10d6e89 100644 --- a/usr.bin/sort/bwstring.c +++ b/usr.bin/sort/bwstring.c @@ -41,10 +41,10 @@ __FBSDID("$FreeBSD$"); #include "bwstring.h" #include "sort.h" -bool byte_sort = false; +bool byte_sort; -static wchar_t **wmonths = NULL; -static unsigned char **cmonths = NULL; +static wchar_t **wmonths; +static unsigned char **cmonths; /* initialise months */ diff --git a/usr.bin/sort/coll.c b/usr.bin/sort/coll.c index 0a341e42270a..6d2d293ee8e5 100644 --- a/usr.bin/sort/coll.c +++ b/usr.bin/sort/coll.c @@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$"); #include "coll.h" #include "vsort.h" -struct key_specs *keys = NULL; +struct key_specs *keys; size_t keys_num = 0; wchar_t symbol_decimal_point = L'.'; diff --git a/usr.bin/sort/file.c b/usr.bin/sort/file.c index 9cfcef4dd348..9afa4b2655f6 100644 --- a/usr.bin/sort/file.c +++ b/usr.bin/sort/file.c @@ -54,7 +54,7 @@ unsigned long long free_memory = 1000000; unsigned long long available_free_memory = 1000000; const char *tmpdir = "/var/tmp"; -const char* compress_program = NULL; +const char *compress_program; size_t max_open_files = 16; diff --git a/usr.bin/sort/radixsort.c b/usr.bin/sort/radixsort.c index 5d0dea750ec1..6fa2d3ae5a8d 100644 --- a/usr.bin/sort/radixsort.c +++ b/usr.bin/sort/radixsort.c @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); #define SMALL_NODE(sl) ((sl)->tosort_num < 5) /* are we sorting in reverse order ? */ -static bool reverse_sort = false; +static bool reverse_sort; /* sort sub-levels array size */ static const size_t slsz = 256 * sizeof(struct sort_level*); @@ -77,14 +77,14 @@ struct level_stack { struct sort_level *sl; }; -static struct level_stack *g_ls = NULL; +static struct level_stack *g_ls; #if defined(SORT_THREADS) /* stack guarding mutex */ static pthread_mutex_t g_ls_mutex; /* counter: how many items are left */ -static size_t sort_left = 0; +static size_t sort_left; /* guarding mutex */ static pthread_mutex_t sort_left_mutex; diff --git a/usr.bin/sort/sort.c b/usr.bin/sort/sort.c index c0b87bac3383..6bd7b3848da8 100644 --- a/usr.bin/sort/sort.c +++ b/usr.bin/sort/sort.c @@ -62,10 +62,10 @@ nl_catd catalog; #define DEFAULT_RANDOM_SORT_SEED_FILE ("/dev/random") #define MAX_DEFAULT_RANDOM_SEED_DATA_SIZE (1024) -static bool need_random = false; -static const char* random_source = DEFAULT_RANDOM_SORT_SEED_FILE; -static const void* random_seed = NULL; -static size_t random_seed_size = 0; +static bool need_random; +static const char *random_source = DEFAULT_RANDOM_SORT_SEED_FILE; +static const void *random_seed; +static size_t random_seed_size; MD5_CTX md5_ctx; @@ -98,26 +98,26 @@ const char *nlsstr[] = { "", struct sort_opts sort_opts_vals; -bool debug_sort = false; -bool need_hint = false; +bool debug_sort; +bool need_hint; #if defined(SORT_THREADS) size_t ncpu = 1; size_t nthreads = 1; #endif -static bool gnusort_numeric_compatibility = false; +static bool gnusort_numeric_compatibility; static struct sort_mods default_sort_mods_object; struct sort_mods * const default_sort_mods = &default_sort_mods_object; -static bool print_symbols_on_debug = false; +static bool print_symbols_on_debug; /* * Arguments from file (when file0-from option is used: */ static int argc_from_file0 = -1; -static char **argv_from_file0 = NULL; +static char **argv_from_file0; /* * Placeholder symbols for options which have no single-character equivalent