Merge branch 'bugfix/from_github' into 'master'

Bug fixes from Github

See merge request !1487
This commit is contained in:
Ivan Grokhotkov
2017-11-10 11:13:04 +08:00
8 changed files with 37 additions and 26 deletions
+5 -5
View File
@@ -64,14 +64,14 @@ void _esp_error_check_failed(esp_err_t rc, const char *file, int line, const cha
*/
#ifdef NDEBUG
#define ESP_ERROR_CHECK(x) do { \
esp_err_t rc = (x); \
(void) sizeof(rc); \
esp_err_t __err_rc = (x); \
(void) sizeof(__err_rc); \
} while(0);
#else
#define ESP_ERROR_CHECK(x) do { \
esp_err_t rc = (x); \
if (rc != ESP_OK) { \
_esp_error_check_failed(rc, __FILE__, __LINE__, \
esp_err_t __err_rc = (x); \
if (__err_rc != ESP_OK) { \
_esp_error_check_failed(__err_rc, __FILE__, __LINE__, \
__ASSERT_FUNC, #x); \
} \
} while(0);