(config_file) Simplify config_sort_compare_func

This commit is contained in:
twinaphex 2020-08-24 19:29:24 +02:00
parent 700009216c
commit 24910b6999

View File

@ -64,10 +64,12 @@ static int config_sort_compare_func(struct config_entry_list *a,
{ {
if (a && b) if (a && b)
{ {
if (a->key && b->key) if (a->key)
return strcasecmp(a->key, b->key); {
else if (a->key) if (b->key)
return strcasecmp(a->key, b->key);
return 1; return 1;
}
else if (b->key) else if (b->key)
return -1; return -1;
} }