Fixed a bug where not all modems, printers and ethernet interfaces would get listed after sorting.

This commit is contained in:
Ger Schinkel 2022-04-29 13:49:29 +02:00
parent d4baa318e4
commit 425dac6a7c
2 changed files with 4 additions and 4 deletions

View File

@ -1297,7 +1297,7 @@ static GList *add_serial_names(void)
closedir(d);
}
if (glist)
g_list_sort(glist, gl_str_cmp);
glist = g_list_sort(glist, gl_str_cmp);
else
glist = g_list_append(glist, (void *)GetString(STR_NONE_LAB));
return glist;
@ -1339,7 +1339,7 @@ static GList *add_ether_names(void)
glist = g_list_append(glist, s_slirp);
#endif
if (glist)
g_list_sort(glist, gl_str_cmp);
glist = g_list_sort(glist, gl_str_cmp);
else
glist = g_list_append(glist, (void *)GetString(STR_NONE_LAB));
return glist;

View File

@ -1144,7 +1144,7 @@ static GList *add_serial_names(void)
closedir(d);
}
if (glist)
g_list_sort(glist, gl_str_cmp);
glist = g_list_sort(glist, gl_str_cmp);
else
glist = g_list_append(glist, (void *)"<none>");
return glist;
@ -1186,7 +1186,7 @@ static GList *add_ether_names(void)
glist = g_list_append(glist, s_slirp);
#endif
if (glist)
g_list_sort(glist, gl_str_cmp);
glist = g_list_sort(glist, gl_str_cmp);
else
glist = g_list_append(glist, (void *)"<none>");
return glist;