summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/tree.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/tree.c b/apps/tree.c
index c248631744..a18a29e09c 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -979,11 +979,15 @@ int rockbox_browse(const char *root, int dirfilter)
979 setting = global_settings.fmr_file; 979 setting = global_settings.fmr_file;
980 break; 980 break;
981#endif 981#endif
982 default:
983 dir = ext = setting = NULL;
984 break;
982 } 985 }
983 986
984 /* If we've found a file to center on, do it */ 987 /* If we've found a file to center on, do it */
985 if (setting) 988 if (setting)
986 { 989 {
990 /* if setting != NULL, ext and dir are not used uninitialized */
987 snprintf(current, sizeof(current), "%s/%s.%s", dir, setting, ext); 991 snprintf(current, sizeof(current), "%s/%s.%s", dir, setting, ext);
988 set_current_file(current); 992 set_current_file(current);
989 /* set_current_file changes dirlevel, change it back */ 993 /* set_current_file changes dirlevel, change it back */