kopia lustrzana https://github.com/Hamlib/Hamlib
				
				
				
			Fix hash sort comparison for models
							rodzic
							
								
									d7eb9dd72f
								
							
						
					
					
						commit
						c9ace18daa
					
				|  | @ -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); | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
|  | @ -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)) | ||||
|         { | ||||
|  |  | |||
|  | @ -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); | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 Michael Black
						Michael Black