Skip to content
Snippets Groups Projects
Commit 265775fc authored by Craig Tiller's avatar Craig Tiller
Browse files

Handle zero-length filenames

parent c18f3ed0
No related branches found
No related tags found
No related merge requests found
...@@ -90,7 +90,8 @@ static int g_writing_enabled = 1; ...@@ -90,7 +90,8 @@ static int g_writing_enabled = 1;
static const char *output_filename() { static const char *output_filename() {
if (output_filename_or_null == NULL) { if (output_filename_or_null == NULL) {
output_filename_or_null = gpr_getenv("LATENCY_TRACE"); 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"; output_filename_or_null = "latency_trace.txt";
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment