summaryrefslogtreecommitdiff
path: root/src/sort.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1997-10-14 13:40:51 +0000
committerJim Meyering <jim@meyering.net>1997-10-14 13:40:51 +0000
commit8c96da80b01fa21c86a336a17bda2cb01f1f071c (patch)
treebcd8fd45821c0b7c3e76acaf8c2e8d09e90a8693 /src/sort.c
parentdf3a123e859788a0645bc533c39f537733ebef6d (diff)
downloadcoreutils-8c96da80b01fa21c86a336a17bda2cb01f1f071c.tar.xz
(keycompare): Move assignment out of if-expression.
Diffstat (limited to 'src/sort.c')
-rw-r--r--src/sort.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/sort.c b/src/sort.c
index e76da6d6b..8d7fe880e 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -1612,8 +1612,11 @@ keycompare (const struct line *a, const struct line *b)
int x;
x = nls_month_is_either_locale (texta, lena);
- if (nls_month_found = !nls_months_collide[x])
- diff = x - getmonth (textb, lenb);
+ nls_month_found = !nls_months_collide[x];
+ if (nls_month_found)
+ {
+ diff = x - getmonth (textb, lenb);
+ }
else
{
diff = nls_month_is_either_locale (textb, lenb);