diff options
author | Jim Meyering <jim@meyering.net> | 1997-10-13 04:02:42 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1997-10-13 04:02:42 +0000 |
commit | 2c32c6a11af24edee8da125f6153e36d5fcb7fdd (patch) | |
tree | 140e9495431c04b8beb657f89dc1296dd964d857 /src/sort.c | |
parent | b01df13c39c35a867889adb980b4172edf0b8f0d (diff) | |
download | coreutils-2c32c6a11af24edee8da125f6153e36d5fcb7fdd.tar.xz |
eliminate a comma expr,
fix one func return type
eliminate `* 1'
Diffstat (limited to 'src/sort.c')
-rw-r--r-- | src/sort.c | 18 |
1 files changed, 11 insertions, 7 deletions
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 */ |