slightly more efficient

SVN revision: 26860
This commit is contained in:
Carsten Haitzler 2006-10-29 11:03:47 +00:00
parent af7ab32870
commit 669d57ddae
1 changed files with 9 additions and 6 deletions

View File

@ -18,15 +18,18 @@ log_open(void)
char buf[4096] = "DUMMY", *home;
if (log_fd != -1) return;
if (!e_precache_end) e_precache_end = dlsym(NULL, "e_precache_end");
if (!e_precache_end)
{
#ifdef HAVE_UNSETENV
unsetenv("LD_PRELOAD");
#else
if (getenv("LD_PRELOAD")) putenv("LD_PRELOAD");
#endif
e_precache_end = dlsym(NULL, "e_precache_end");
}
if (!e_precache_end) return;
if (*e_precache_end) return;
#ifdef HAVE_UNSETENV
unsetenv("LD_PRELOAD");
#else
if (getenv("LD_PRELOAD")) putenv("LD_PRELOAD");
#endif
home = getenv("HOME");
if (home)
snprintf(buf, sizeof(buf), "%s/.e-precache", home);