@@ -635,10 +635,8 @@ INTERCEPTOR_STRTO_BASE(long long, __isoc23_strtoll)
635635INTERCEPTOR (int , atoi, const char *nptr) {
636636 void *ctx;
637637 ASAN_INTERCEPTOR_ENTER (ctx, atoi);
638- #if SANITIZER_APPLE
639- if (UNLIKELY (!AsanInited ()))
638+ if (SANITIZER_APPLE && UNLIKELY (!AsanInited ()))
640639 return REAL (atoi)(nptr);
641- # endif
642640 ENSURE_ASAN_INITED ();
643641 if (!flags ()->replace_str ) {
644642 return REAL (atoi)(nptr);
@@ -657,10 +655,8 @@ INTERCEPTOR(int, atoi, const char *nptr) {
657655INTERCEPTOR (long , atol, const char *nptr) {
658656 void *ctx;
659657 ASAN_INTERCEPTOR_ENTER (ctx, atol);
660- #if SANITIZER_APPLE
661- if (UNLIKELY (!AsanInited ()))
658+ if (SANITIZER_APPLE && UNLIKELY (!AsanInited ()))
662659 return REAL (atol)(nptr);
663- # endif
664660 ENSURE_ASAN_INITED ();
665661 if (!flags ()->replace_str ) {
666662 return REAL (atol)(nptr);
@@ -696,10 +692,8 @@ static void AtCxaAtexit(void *unused) {
696692#if ASAN_INTERCEPT___CXA_ATEXIT
697693INTERCEPTOR (int , __cxa_atexit, void (*func)(void *), void *arg,
698694 void *dso_handle) {
699- #if SANITIZER_APPLE
700- if (UNLIKELY (!AsanInited ()))
695+ if (SANITIZER_APPLE && UNLIKELY (!AsanInited ()))
701696 return REAL (__cxa_atexit)(func, arg, dso_handle);
702- # endif
703697 ENSURE_ASAN_INITED ();
704698#if CAN_SANITIZE_LEAKS
705699 __lsan::ScopedInterceptorDisabler disabler;
0 commit comments