summaryrefslogtreecommitdiffstats
path: root/thread.c
diff options
context:
space:
mode:
authorRalf Wildenhues <wildenhues@ins.uni-bonn.de>2010-10-13 07:38:30 -0700
committerRalf Wildenhues <wildenhues@ins.uni-bonn.de>2010-10-13 07:38:30 -0700
commitedb6e85963d193f8b76537646691cab0318017b4 (patch)
tree1f512a8e0ffb9102695703598dd8cb2a32eb68f7 /thread.c
parent36c6e8e36bd7db63c02964f1082ffddb1cca33fb (diff)
fix a minor logic error in thread.c, and a dead code line
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/thread.c b/thread.c
index a6b594cd..d69ac883 100644
--- a/thread.c
+++ b/thread.c
@@ -572,7 +572,7 @@ static int compare_threads (const void *a, const void *b)
{
static sort_t *sort_func = NULL;
- if (a || b)
+ if (a && b)
return ((*sort_func) (&(*((THREAD **) a))->sort_key,
&(*((THREAD **) b))->sort_key));
/* a hack to let us reset sort_func even though we can't
@@ -580,7 +580,6 @@ static int compare_threads (const void *a, const void *b)
*/
else
{
- sort_func = NULL;
sort_func = mutt_get_sort_func (Sort);
return (sort_func ? 1 : 0);
}