From 81e88764d563ee84e28408d90388a98ced27d8fa Mon Sep 17 00:00:00 2001 From: suda-morris <362953310@qq.com> Date: Mon, 14 Oct 2019 19:49:19 +0800 Subject: [PATCH] console: fix wrong param passed to esp_err_to_name --- examples/ethernet/iperf/main/ethernet_example_main.c | 2 +- examples/peripherals/i2c/i2c_tools/main/i2ctools_example_main.c | 2 +- examples/system/console/main/console_example_main.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/ethernet/iperf/main/ethernet_example_main.c b/examples/ethernet/iperf/main/ethernet_example_main.c index 0d881fa5d5..7a57826bfa 100644 --- a/examples/ethernet/iperf/main/ethernet_example_main.c +++ b/examples/ethernet/iperf/main/ethernet_example_main.c @@ -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)); } diff --git a/examples/peripherals/i2c/i2c_tools/main/i2ctools_example_main.c b/examples/peripherals/i2c/i2c_tools/main/i2ctools_example_main.c index 0cffbafd68..85826fd2d4 100644 --- a/examples/peripherals/i2c/i2c_tools/main/i2ctools_example_main.c +++ b/examples/peripherals/i2c/i2c_tools/main/i2ctools_example_main.c @@ -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)); } diff --git a/examples/system/console/main/console_example_main.c b/examples/system/console/main/console_example_main.c index e89196c4b8..2348ac12e7 100644 --- a/examples/system/console/main/console_example_main.c +++ b/examples/system/console/main/console_example_main.c @@ -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)); } -- 2.40.0