diff options
author | José Fonseca <[email protected]> | 2008-03-25 11:37:24 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2008-03-25 11:37:24 +0000 |
commit | 6fa0bd067176d9159a741014301dfb5fbbd9c4b5 (patch) | |
tree | 998ee7a3c7ec999bb562a11dafa0a9a832bc4b46 /src/gallium/auxiliary/util/p_debug.c | |
parent | d453042bc67cc94bb215d229b60e8cd70a80ff8d (diff) |
gallium: Fix default option on Windows.
Diffstat (limited to 'src/gallium/auxiliary/util/p_debug.c')
-rw-r--r-- | src/gallium/auxiliary/util/p_debug.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/gallium/auxiliary/util/p_debug.c b/src/gallium/auxiliary/util/p_debug.c index cc036dabf82..5447bbb6f55 100644 --- a/src/gallium/auxiliary/util/p_debug.c +++ b/src/gallium/auxiliary/util/p_debug.c @@ -155,10 +155,12 @@ debug_get_option(const char *name, const char *dfault) const char *sol, *eol, *sep; static char output[1024]; + result = dfault; + /* XXX: this creates the file if it does not exists, so it must either be + * disabled on release versions, or put in a less conspicuous place. + */ pMap = EngMapFile(L"\\??\\c:\\gallium.cfg", 0, &iFile); - if(!pMap) - result = dfault; - else { + if(pMap) { sol = (const char *)pMap; while(1) { /* TODO: handle LF line endings */ @@ -184,10 +186,7 @@ debug_get_option(const char *name, const char *dfault) result = dfault; #endif - if(result) - debug_printf("%s: %s = %s\n", __FUNCTION__, name, result); - else - debug_printf("%s: %s = (null)\n", __FUNCTION__, name); + debug_printf("%s: %s = %s\n", __FUNCTION__, name, result ? result : "(null)"); return result; } |