(vfs_path_tokens_get): minor refactoring: replace while() by for().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Этот коммит содержится в:
родитель
f3bdcb186b
Коммит
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, "");
|
g_string_assign (element_tokens, "");
|
||||||
element = vfs_path_get_by_index (vpath, element_index);
|
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')
|
if (**iterator != '\0')
|
||||||
{
|
{
|
||||||
@ -1431,7 +1431,6 @@ vfs_path_tokens_get (const vfs_path_t * vpath, ssize_t start_position, ssize_t l
|
|||||||
else
|
else
|
||||||
start_position--;
|
start_position--;
|
||||||
}
|
}
|
||||||
iterator++;
|
|
||||||
}
|
}
|
||||||
g_strfreev (path_tokens);
|
g_strfreev (path_tokens);
|
||||||
vfs_path_tokens_add_class_info (element, ret_tokens, element_tokens);
|
vfs_path_tokens_add_class_info (element, ret_tokens, element_tokens);
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user