From fb8ce59728e83ed53a14d501e3cc54e44cd2eee7 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sat, 28 Dec 2019 16:14:50 -0600 Subject: Cleanup, mostly whitespace. --- toys/posix/sort.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'toys/posix/sort.c') diff --git a/toys/posix/sort.c b/toys/posix/sort.c index 4b3fe24d..9f38be82 100644 --- a/toys/posix/sort.c +++ b/toys/posix/sort.c @@ -62,8 +62,7 @@ GLOBALS( void *key_list; int linecount; - char **lines; - char *name; + char **lines, *name; ) // The sort types are n, g, and M. @@ -84,7 +83,7 @@ struct sort_key static char *get_key_data(char *str, struct sort_key *key, int flags) { - int start=0, end, len, i, j; + int start = 0, end, len, i, j; // Special case whole string, so we don't have to make a copy @@ -99,8 +98,8 @@ static char *get_key_data(char *str, struct sort_key *key, int flags) // Loop through fields else { - end=0; - for (i=1; i < key->range[2*j]+j; i++) { + end = 0; + for (i = 1; i < key->range[2*j]+j; i++) { // Skip leading blanks if (str[end] && !TT.t) while (isspace(str[end])) end++; @@ -138,7 +137,7 @@ static char *get_key_data(char *str, struct sort_key *key, int flags) } // Make the copy - if (endj) error_exit("%s: Check line %d\n", TT.name, TT.linecount); free(TT.lines); - TT.lines = (char **)line; + TT.lines = (void *)line; } else { if (!(TT.linecount&63)) TT.lines = xrealloc(TT.lines, sizeof(char *)*(TT.linecount+64)); -- cgit v1.2.3