Browse Source

esp_timer: Fix Test ESP_TIMER_ISR dispatch method is not blocked

KonstantinKondrashov 5 years ago
parent
commit
7bbf4a3422
1 changed files with 6 additions and 6 deletions
  1. 6 6
      components/esp_timer/src/esp_timer.c

+ 6 - 6
components/esp_timer/src/esp_timer.c

@@ -568,16 +568,16 @@ esp_err_t esp_timer_dump(FILE* stream)
         timer_list_unlock(dispatch_method);
     }
 
-    fprintf(stream, "Timer stats:\n");
+    if (stream != NULL) {
+        fprintf(stream, "Timer stats:\n");
 #if WITH_PROFILING
-    fprintf(stream, "%-20s  %-10s  %-12s  %-12s  %-12s  %-12s  %-12s\n",
-            "Name", "Period", "Alarm", "Times_armed", "Times_trigg", "Times_skip", "Cb_exec_time");
+        fprintf(stream, "%-20s  %-10s  %-12s  %-12s  %-12s  %-12s  %-12s\n",
+                "Name", "Period", "Alarm", "Times_armed", "Times_trigg", "Times_skip", "Cb_exec_time");
 #else
-    fprintf(stream, "%-20s  %-10s  %-12s\n", "Name", "Period", "Alarm");
+        fprintf(stream, "%-20s  %-10s  %-12s\n", "Name", "Period", "Alarm");
 #endif
 
-    /* Print the buffer */
-    if (stream != NULL) {
+        /* Print the buffer */
         fputs(print_buf, stream);
     }