diff options
author | Craig Tiller <ctiller@google.com> | 2017-02-08 11:40:14 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-02-08 11:44:52 -0800 |
commit | 265775fc20496ea18d49c42d39fe727b65f78bc4 (patch) | |
tree | 21e1e7bd21fec0e29bf86ff03529264da0cedc2a | |
parent | c18f3ed03873a90a0f986f12a84e742c89fc84b0 (diff) |
Handle zero-length filenames
-rw-r--r-- | src/core/lib/profiling/basic_timers.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/lib/profiling/basic_timers.c b/src/core/lib/profiling/basic_timers.c index c4f2772822..1fbc9d7023 100644 --- a/src/core/lib/profiling/basic_timers.c +++ b/src/core/lib/profiling/basic_timers.c @@ -90,7 +90,8 @@ static int g_writing_enabled = 1; static const char *output_filename() { if (output_filename_or_null == NULL) { output_filename_or_null = gpr_getenv("LATENCY_TRACE"); - if (output_filename_or_null == NULL) { + if (output_filename_or_null == NULL || + strlen(output_filename_or_null) == 0) { output_filename_or_null = "latency_trace.txt"; } } |