From: Ralf Wildenhues Date: Wed, 13 Oct 2010 14:38:30 +0000 (-0700) Subject: fix a minor logic error in thread.c, and a dead code line X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ce8be165f37ee8ce13d4f62a5f92610e04a312b4;p=neomutt fix a minor logic error in thread.c, and a dead code line --- diff --git a/thread.c b/thread.c index a6b594cd9..d69ac8838 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); }