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
This commit is contained in:
Felipe Neves 2019-10-25 11:24:12 -03:00
parent fc00236d79
commit 1b76253e0e
2 changed files with 3 additions and 2 deletions

View File

@ -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>

View File

@ -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