Make FcInitDebug() idempotent

This commit is contained in:
Behdad Esfahbod 2012-10-07 16:09:35 -04:00
parent b97ab0c949
commit 7019896c99
1 changed files with 10 additions and 8 deletions

View File

@ -455,15 +455,17 @@ int FcDebugVal;
void
FcInitDebug (void)
{
char *e;
if (!FcDebugVal) {
char *e;
e = getenv ("FC_DEBUG");
if (e)
{
printf ("FC_DEBUG=%s\n", e);
FcDebugVal = atoi (e);
if (FcDebugVal < 0)
FcDebugVal = 0;
e = getenv ("FC_DEBUG");
if (e)
{
printf ("FC_DEBUG=%s\n", e);
FcDebugVal = atoi (e);
if (FcDebugVal < 0)
FcDebugVal = 0;
}
}
}
#define __fcdbg__