Merge pull request #3103 from matt335672/fix_display_list

Fix session list processing
This commit is contained in:
matt335672 2024-06-03 09:42:28 +01:00 committed by GitHub
commit c98289732e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -209,9 +209,12 @@ x_server_running_check_ports(int display)
/******************************************************************************/
/* Helper function for get_sorted_display_list():qsort() */
static int
icmp(const void *i1, const void *i2)
icmp(const void *v1, const void *v2)
{
return *(const unsigned int *)i2 - *(const unsigned int *)i1;
// Pointers point to unsigned ints
unsigned int i1 = *(unsigned int *)v1;
unsigned int i2 = *(unsigned int *)v2;
return (i1 < i2) ? -1 : (i1 > i2) ? 1 : 0;
}
/******************************************************************************/