diff options
Diffstat (limited to 'coreutils/sort.c')
-rw-r--r-- | coreutils/sort.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/coreutils/sort.c b/coreutils/sort.c index 0b3b650c9..1cb4c3e3f 100644 --- a/coreutils/sort.c +++ b/coreutils/sort.c | |||
@@ -302,10 +302,14 @@ static int compare_keys(const void *xarg, const void *yarg) | |||
302 | } /* for */ | 302 | } /* for */ |
303 | 303 | ||
304 | /* Perform fallback sort if necessary */ | 304 | /* Perform fallback sort if necessary */ |
305 | if (!retval && !(option_mask32 & FLAG_s)) | 305 | if (!retval && !(option_mask32 & FLAG_s)) { |
306 | retval = strcmp(*(char **)xarg, *(char **)yarg); | 306 | retval = strcmp(*(char **)xarg, *(char **)yarg); |
307 | flags = option_mask32; | ||
308 | } | ||
309 | |||
310 | if (flags & FLAG_r) | ||
311 | return -retval; | ||
307 | 312 | ||
308 | if (flags & FLAG_r) return -retval; | ||
309 | return retval; | 313 | return retval; |
310 | } | 314 | } |
311 | 315 | ||