X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=src%2Fcontext.c;h=ed26f8223214fb62c989e5ee8b57170a75771476;hb=b6a04e85779e14399f03e91939b8cb47eb330ef7;hp=218da24abb541a0a45d012650f51fa46550822e0;hpb=f4874db385a345217df8d1d31f55ab2f2b36dac3;p=m6w6%2Fext-psi diff --git a/src/context.c b/src/context.c index 218da24..ed26f82 100644 --- a/src/context.c +++ b/src/context.c @@ -184,7 +184,7 @@ void PSI_ContextBuild(PSI_Context *C, const char *paths) { int i, n; char *sep = NULL, *cpy = strdup(paths), *ptr = cpy; - struct dirent **entries = NULL; + struct dirent **entries; do { sep = strchr(ptr, ':'); @@ -193,6 +193,7 @@ void PSI_ContextBuild(PSI_Context *C, const char *paths) *sep = 0; } + entries = NULL; n = php_scandir(ptr, &entries, psi_select_dirent, alphasort); if (n > 0) {