Fix hash sort comparison for models

pull/154/head
Michael Black 2019-12-06 12:13:38 -06:00
rodzic d7eb9dd72f
commit c9ace18daa
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6599353EC683404D
3 zmienionych plików z 6 dodań i 6 usunięć

Wyświetl plik

@ -263,7 +263,7 @@ void hash_add_model(int id,
/* Hash sorting functions */
int hash_model_id_sort(struct mod_lst *a, struct mod_lst *b)
{
return (a->id - b->id);
return (a->id > b->id);
}

Wyświetl plik

@ -329,7 +329,7 @@ static struct test_table *find_cmd_entry(int cmd)
{
int i;
for (i = 0; i < MAXNBOPT && test_list[i].cmd != 0x00; i++)
for (i = 0; test_list[i].cmd != 0x00; i++)
{
if (test_list[i].cmd == cmd)
{
@ -390,7 +390,7 @@ void hash_add_model(int id,
/* Hash sorting functions */
int hash_model_id_sort(struct mod_lst *a, struct mod_lst *b)
{
return (a->id - b->id);
return (a->id > b->id);
}
@ -453,7 +453,7 @@ static char parse_arg(const char *arg)
{
int i;
for (i = 0; i < MAXNBOPT && test_list[i].cmd != 0; i++)
for (i = 0; test_list[i].cmd != 0x00; i++)
{
if (!strncmp(arg, test_list[i].name, MAXNAMSIZ))
{

Wyświetl plik

@ -234,7 +234,7 @@ struct test_table *find_cmd_entry(int cmd)
{
int i;
for (i = 0; i < MAXNBOPT && test_list[i].cmd != 0x00; i++)
for (i = 0; test_list[i].cmd != 0x00; i++)
if (test_list[i].cmd == cmd)
{
break;
@ -292,7 +292,7 @@ void hash_add_model(int id,
/* Hash sorting functions */
int hash_model_id_sort(struct mod_lst *a, struct mod_lst *b)
{
return (a->id - b->id);
return (a->id > b->id);
}