From 5678972dca34f06bfa520bd7e9ee558a1a3164b4 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 22 Jul 2011 14:41:08 +0100 Subject: helper: Move all_files down function. This is just code tidy-up. --- helper/kernel.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/helper/kernel.c b/helper/kernel.c index adee8c2..45d7034 100644 --- a/helper/kernel.c +++ b/helper/kernel.c @@ -97,8 +97,6 @@ static char *create_kernel_archlinux (const char *hostcpu, const char *kernel); const char * create_kernel (const char *hostcpu, const char *kernel) { - char **all_files = read_dir (KERNELDIR); - /* In ArchLinux, kernel is always named /boot/vmlinuz26. */ if (access ("/boot/vmlinuz26", F_OK) == 0) return create_kernel_archlinux (hostcpu, kernel); @@ -111,6 +109,7 @@ create_kernel (const char *hostcpu, const char *kernel) else patt = xasprintf ("vmlinuz-*.%s*", hostcpu); + char **all_files = read_dir (KERNELDIR); char **candidates; candidates = filter_fnmatch (all_files, patt, FNM_NOESCAPE); candidates = filter_notmatching_substring (candidates, "xen"); -- cgit