From 2c32c6a11af24edee8da125f6153e36d5fcb7fdd Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 13 Oct 1997 04:02:42 +0000 Subject: eliminate a comma expr, fix one func return type eliminate `* 1' --- src/sort.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'src/sort.c') diff --git a/src/sort.c b/src/sort.c index dd605bf8d..5b4fc4715 100644 --- a/src/sort.c +++ b/src/sort.c @@ -1055,7 +1055,7 @@ fraccompare (register const char *a, register const char *b) #ifdef ENABLE_NLS /* Decide the kind of fraction the program will use */ -static int +static void nls_set_fraction (register unsigned char ch) { if (!nls_fraction_found && ch != decimal_point) @@ -1074,8 +1074,7 @@ nls_set_fraction (register unsigned char ch) decimal_point = ch; th_sep = '\0'; } - /* FIXME: fix return type here, too. */ - return nls_fraction_found = 1; + nls_fraction_found = 1; } /* Look for a fraction @@ -1124,7 +1123,9 @@ nls_set_fraction (register unsigned char ch) the seperator has to be a decimal point... */ -/* FIXME: can these be const? */ +/* FIXME: can these parameters be const? */ +/* FIXME: describe: no meaningful return value -- + updates global, nls_fraction_found */ static int look_for_fraction (unsigned char *s, unsigned char *e) { @@ -1231,9 +1232,12 @@ numcompare (register const unsigned char *a, register const unsigned char *b) else { /* either both numbers are signed, or both are not-signed */ - /* FIXME: clean up */ if (*a == NEGATIVE_SIGN) - ++a, ++b, ret_code = -1; + { + ++a; + ++b; + ret_code = -1; + } /* if both are signed, then remember -100 < -10 (ret_code reversed!) */ /* Skip any leading zeroes */ @@ -1272,7 +1276,7 @@ numcompare (register const unsigned char *a, register const unsigned char *b) } if (ISDIGIT (*a)) - return ret_code * 1; /* a has more digits than b */ + return ret_code; /* a has more digits than b */ if (ISDIGIT (*b)) return ret_code * -1; /* b has more digits than a */ -- cgit v1.2.3-54-g00ecf