]> granicus.if.org Git - esp-idf/commitdiff
console: fix wrong param passed to esp_err_to_name
authorsuda-morris <362953310@qq.com>
Mon, 14 Oct 2019 11:49:19 +0000 (19:49 +0800)
committersuda-morris <362953310@qq.com>
Mon, 14 Oct 2019 11:49:19 +0000 (19:49 +0800)
examples/ethernet/iperf/main/ethernet_example_main.c
examples/peripherals/i2c/i2c_tools/main/i2ctools_example_main.c
examples/system/console/main/console_example_main.c

index 0d881fa5d50b00c4b575f2b3a3d1ea8cde7a8748..7a57826bfa71b0c4d88b934ddc1fa27c41c010a0 100644 (file)
@@ -182,7 +182,7 @@ void app_main(void)
         } else if (err == ESP_ERR_INVALID_ARG) {
             // command was empty
         } else if (err == ESP_OK && ret != ESP_OK) {
-            printf("Command returned non-zero error code: 0x%x (%s)\n", ret, esp_err_to_name(err));
+            printf("Command returned non-zero error code: 0x%x (%s)\n", ret, esp_err_to_name(ret));
         } else if (err != ESP_OK) {
             printf("Internal error: %s\n", esp_err_to_name(err));
         }
index 0cffbafd68853bb32d1053ff61a66c2e6f5579aa..85826fd2d4f35ea7a93cbd8e375c6c4178bad2f2 100644 (file)
@@ -183,7 +183,7 @@ void app_main(void)
         } else if (err == ESP_ERR_INVALID_ARG) {
             // command was empty
         } else if (err == ESP_OK && ret != ESP_OK) {
-            printf("Command returned non-zero error code: 0x%x (%s)\n", ret, esp_err_to_name(err));
+            printf("Command returned non-zero error code: 0x%x (%s)\n", ret, esp_err_to_name(ret));
         } else if (err != ESP_OK) {
             printf("Internal error: %s\n", esp_err_to_name(err));
         }
index e89196c4b80fdb627568182c2db2306110984cc9..2348ac12e7d0ca7e4629428c458e2aec47ebc050 100644 (file)
@@ -182,7 +182,7 @@ void app_main(void)
         } else if (err == ESP_ERR_INVALID_ARG) {
             // command was empty
         } else if (err == ESP_OK && ret != ESP_OK) {
-            printf("Command returned non-zero error code: 0x%x (%s)\n", ret, esp_err_to_name(err));
+            printf("Command returned non-zero error code: 0x%x (%s)\n", ret, esp_err_to_name(ret));
         } else if (err != ESP_OK) {
             printf("Internal error: %s\n", esp_err_to_name(err));
         }