mirror of
https://github.com/MidnightCommander/mc
synced 2025-02-12 21:34:15 +03:00
(lookup_key): minor refactoring: replace while() by for().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
546e89f611
commit
bb142bf47f
@ -1471,10 +1471,10 @@ lookup_key (const char *name, char **label)
|
||||
return 0;
|
||||
|
||||
name = g_strstrip (g_strdup (name));
|
||||
p = lc_keys = g_strsplit_set (name, "-+ ", -1);
|
||||
lc_keys = g_strsplit_set (name, "-+ ", -1);
|
||||
g_free ((char *) name);
|
||||
|
||||
while ((p != NULL) && (*p != NULL))
|
||||
for (p = lc_keys; p != NULL && *p != NULL; p++)
|
||||
{
|
||||
if ((*p)[0] != '\0')
|
||||
{
|
||||
@ -1495,8 +1495,6 @@ lookup_key (const char *name, char **label)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
p++;
|
||||
}
|
||||
|
||||
g_strfreev (lc_keys);
|
||||
@ -1505,7 +1503,6 @@ lookup_key (const char *name, char **label)
|
||||
if (k <= 0)
|
||||
return 0;
|
||||
|
||||
|
||||
if (label != NULL)
|
||||
{
|
||||
GString *s;
|
||||
|
Loading…
x
Reference in New Issue
Block a user