]> code.delx.au - pulseaudio/commitdiff
log: print file name only when we have it
authorLennart Poettering <lennart@poettering.net>
Sun, 19 Apr 2009 17:04:50 +0000 (19:04 +0200)
committerLennart Poettering <lennart@poettering.net>
Sun, 19 Apr 2009 17:04:50 +0000 (19:04 +0200)
src/pulsecore/log.c

index 60ea9c592d65d59e99c6d8774774fe6c84d5751e..919ebe1fad584755f6648b6c297cecc10e339ea9 100644 (file)
@@ -285,7 +285,7 @@ void pa_log_levelv_meta(
 
     if ((_flags & PA_LOG_PRINT_META) && file && line > 0 && func)
         pa_snprintf(location, sizeof(location), "[%s:%i %s()] ", file, line, func);
-    else if (_flags & (PA_LOG_PRINT_META|PA_LOG_PRINT_FILE))
+    else if ((_flags & (PA_LOG_PRINT_META|PA_LOG_PRINT_FILE)) && file)
         pa_snprintf(location, sizeof(location), "%s: ", pa_path_get_filename(file));
     else
         location[0] = 0;