comparison src/ui_tabcomp.c @ 516:b7e99bfeadc9

Convert the minority of while() to while ().
author zas_
date Thu, 24 Apr 2008 15:49:57 +0000
parents 48c8e49b571c
children fbebf5cf4a55
comparison
equal deleted inserted replaced
515:adc45cd3f08b 516:b7e99bfeadc9
86 g_free(td->dir_path); 86 g_free(td->dir_path);
87 td->dir_path = NULL; 87 td->dir_path = NULL;
88 88
89 list = td->file_list; 89 list = td->file_list;
90 90
91 while(list) 91 while (list)
92 { 92 {
93 g_free(list->data); 93 g_free(list->data);
94 list = list->next; 94 list = list->next;
95 } 95 }
96 96
455 } 455 }
456 456
457 if (strcmp(entry_dir, "/") == 0) entry_dir[0] = '\0'; 457 if (strcmp(entry_dir, "/") == 0) entry_dir[0] = '\0';
458 458
459 list = td->file_list; 459 list = td->file_list;
460 while(list) 460 while (list)
461 { 461 {
462 gchar *file = list->data; 462 gchar *file = list->data;
463 if (strncmp(entry_file, file, l) == 0) 463 if (strncmp(entry_file, file, l) == 0)
464 { 464 {
465 poss = g_list_prepend(poss, file); 465 poss = g_list_prepend(poss, file);
496 496
497 while (!done) 497 while (!done)
498 { 498 {
499 list = poss; 499 list = poss;
500 if (!list) done = TRUE; 500 if (!list) done = TRUE;
501 while(list && !done) 501 while (list && !done)
502 { 502 {
503 gchar *file = list->data; 503 gchar *file = list->data;
504 if (strlen(file) < c || strncmp(test_file, file, c) != 0) 504 if (strlen(file) < c || strncmp(test_file, file, c) != 0)
505 { 505 {
506 done = TRUE; 506 done = TRUE;