cache answer

This commit is contained in:
rsc 2005-01-04 22:19:07 +00:00
parent 66c10f02c3
commit b94ad13d4b

View file

@ -4,10 +4,15 @@
char*
get9root(void)
{
char *s;
static char *s;
if(s)
return s;
if((s = getenv("PLAN9")) != 0)
return s;
return "/usr/local/plan9";
/* could do better - search $PATH */
s = "/usr/local/plan9";
return s;
}