mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 01:54:24 +03:00
(vfs_path_tokens_get): minor refactoring: replace while() by for().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
f3bdcb186b
commit
546e89f611
@ -1408,9 +1408,9 @@ vfs_path_tokens_get (const vfs_path_t * vpath, ssize_t start_position, ssize_t l
|
||||
|
||||
g_string_assign (element_tokens, "");
|
||||
element = vfs_path_get_by_index (vpath, element_index);
|
||||
path_tokens = iterator = g_strsplit (element->path, PATH_SEP_STR, -1);
|
||||
path_tokens = g_strsplit (element->path, PATH_SEP_STR, -1);
|
||||
|
||||
while (*iterator != NULL)
|
||||
for (iterator = path_tokens; *iterator != NULL; iterator++)
|
||||
{
|
||||
if (**iterator != '\0')
|
||||
{
|
||||
@ -1431,7 +1431,6 @@ vfs_path_tokens_get (const vfs_path_t * vpath, ssize_t start_position, ssize_t l
|
||||
else
|
||||
start_position--;
|
||||
}
|
||||
iterator++;
|
||||
}
|
||||
g_strfreev (path_tokens);
|
||||
vfs_path_tokens_add_class_info (element, ret_tokens, element_tokens);
|
||||
|
Loading…
Reference in New Issue
Block a user