mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 10:04:32 +03:00
(get_codepage_index): minor optimizations.
Signed-off-by: Andrew V. Samoilov <a.samoilov@gmail.com>
This commit is contained in:
parent
56081caaae
commit
d78fc418ec
@ -245,10 +245,11 @@ int
|
||||
get_codepage_index (const char *id)
|
||||
{
|
||||
size_t i;
|
||||
if (strcmp (id, OTHER_8BIT) == 0)
|
||||
return -1;
|
||||
|
||||
if (codepages == NULL)
|
||||
return -1;
|
||||
if (strcmp (id, OTHER_8BIT) == 0)
|
||||
return -1;
|
||||
for (i = 0; i < codepages->len; i++)
|
||||
if (strcmp (id, ((codepage_desc *) g_ptr_array_index (codepages, i))->id) == 0)
|
||||
return i;
|
||||
@ -292,8 +293,8 @@ init_translation_table (int cpsource, int cpdisplay)
|
||||
{
|
||||
conv_displ[i] = i;
|
||||
conv_input[i] = i;
|
||||
cp_source = cp_display;
|
||||
}
|
||||
cp_source = cp_display;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user