server: fix missing comma in fio_server_ops[] strings
[fio.git] / stat.c
diff --git a/stat.c b/stat.c
index 509c6f02875aee1c648f9e9a432b108a6aa768c8..ca733108a879b772d45186a0600e8439f9f50433 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -831,7 +831,7 @@ static void show_thread_status_terse_v2(struct thread_stat *ts,
        log_info("\n");
 
        /* Additional output if description is set */
-       if (ts->description)
+       if (strlen(ts->description))
                log_info(";%s", ts->description);
 
        log_info("\n");
@@ -1494,8 +1494,11 @@ static int check_status_file(void)
                return 0;
 
        temp_dir = getenv("TMPDIR");
-       if (temp_dir == NULL)
+       if (temp_dir == NULL) {
                temp_dir = getenv("TEMP");
+               if (temp_dir && strlen(temp_dir) >= PATH_MAX)
+                       temp_dir = NULL;
+       }
        if (temp_dir == NULL)
                temp_dir = "/tmp";