newlib/assert: placed unlikely macro as part of assertion

newlib/assert: replace unlikely with likely to keep original assertion

newlib/assert: fix assert macro that uses likely

freertos/port: add the missing sdkconfig.h back

newlib/assert: assert macro back to a single line
pull/4623/head
Felipe Neves 2019-10-25 11:24:12 -03:00
rodzic fc00236d79
commit 1b76253e0e
2 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -90,7 +90,6 @@
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
*/
#include <stdlib.h>
#include <string.h>
#include <xtensa/config/core.h>

Wyświetl plik

@ -19,10 +19,12 @@
#pragma once
#include <sdkconfig.h>
#include <stdlib.h>
#include "esp_compiler.h"
#include_next <assert.h>
#if defined(CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT) && !defined(NDEBUG)
#undef assert
#define assert(__e) ((__e) ? (void)0 : abort())
#define assert(__e) (likely(__e)) ? (void)0 : abort()
#endif