Lines Matching refs:s1
763 static int elect_display_compare(Session *s1, Session *s2) { in elect_display_compare() argument
780 if (!s1 && !s2) in elect_display_compare()
783 if ((s1 == NULL) != (s2 == NULL)) in elect_display_compare()
784 return (s1 == NULL) - (s2 == NULL); in elect_display_compare()
786 if (s1->stopping != s2->stopping) in elect_display_compare()
787 return s1->stopping - s2->stopping; in elect_display_compare()
789 if ((s1->class != SESSION_USER) != (s2->class != SESSION_USER)) in elect_display_compare()
790 return (s1->class != SESSION_USER) - (s2->class != SESSION_USER); in elect_display_compare()
792 if ((s1->type == _SESSION_TYPE_INVALID) != (s2->type == _SESSION_TYPE_INVALID)) in elect_display_compare()
793 return (s1->type == _SESSION_TYPE_INVALID) - (s2->type == _SESSION_TYPE_INVALID); in elect_display_compare()
795 if (s1->type != s2->type) in elect_display_compare()
796 return type_ranks[s1->type] - type_ranks[s2->type]; in elect_display_compare()