summaryrefslogtreecommitdiff
path: root/scripts/kconfig/zconf.l
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/kconfig/zconf.l')
-rw-r--r--scripts/kconfig/zconf.l3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l
index d839577ca..6a58b80d3 100644
--- a/scripts/kconfig/zconf.l
+++ b/scripts/kconfig/zconf.l
@@ -265,13 +265,14 @@ static void zconf_endhelp(void)
265 */ 265 */
266FILE *zconf_fopen(const char *name) 266FILE *zconf_fopen(const char *name)
267{ 267{
268 char *env, fullname[PATH_MAX+1]; 268 char *env;
269 FILE *f; 269 FILE *f;
270 270
271 f = fopen(name, "r"); 271 f = fopen(name, "r");
272 if (!f && name[0] != '/') { 272 if (!f && name[0] != '/') {
273 env = getenv(SRCTREE); 273 env = getenv(SRCTREE);
274 if (env) { 274 if (env) {
275 char *fullname = alloca(strlen(env) + strlen(name) + 2);
275 sprintf(fullname, "%s/%s", env, name); 276 sprintf(fullname, "%s/%s", env, name);
276 f = fopen(fullname, "r"); 277 f = fopen(fullname, "r");
277 } 278 }