* is_descendant - Is one thread a descendant of another
* @param a Parent thread
* @param b Child thread
- * @retval 1 If b is a descendent of a (child, grandchild, etc)
+ * @retval true If b is a descendent of a (child, grandchild, etc)
*/
-int is_descendant(struct MuttThread *a, struct MuttThread *b)
+bool is_descendant(struct MuttThread *a, struct MuttThread *b)
{
while (a)
{
if (a == b)
- return 1;
+ return true;
a = a->parent;
}
- return 0;
+ return false;
}
/**
if (cur->sort_key)
{
- for (tmp = cur->parent; tmp && tmp->sort_key == cur->sort_key; tmp = tmp->parent)
+ for (tmp = cur->parent; tmp && (tmp->sort_key == cur->sort_key); tmp = tmp->parent)
tmp->sort_key = NULL;
}
}
{
struct MuttThread *top = NULL;
- if (cur->message && cur->message->virtual >= 0)
+ if (cur->message && (cur->message->virtual >= 0))
return cur->message;
top = cur;
while (true)
{
- if (cur->message && cur->message->virtual >= 0)
+ if (cur->message && (cur->message->virtual >= 0))
return cur->message;
if (cur->child)
{
mutt_list_free(&hdr->env->in_reply_to);
mutt_list_free(&hdr->env->references);
- hdr->env->irt_changed = hdr->env->refs_changed = hdr->changed = true;
+ hdr->env->irt_changed = true;
+ hdr->env->refs_changed = true;
+ hdr->changed = true;
clean_references(hdr->thread, hdr->thread->child);
}
void clean_references(struct MuttThread *brk, struct MuttThread *cur);
struct Header *find_virtual(struct MuttThread *cur, int reverse);
void insert_message(struct MuttThread **new, struct MuttThread *newparent, struct MuttThread *cur);
-int is_descendant(struct MuttThread *a, struct MuttThread *b);
+bool is_descendant(struct MuttThread *a, struct MuttThread *b);
void mutt_break_thread(struct Header *hdr);
void thread_hash_destructor(int type, void *obj, intptr_t data);
void unlink_message(struct MuttThread **old, struct MuttThread *cur);