Lines Matching defs:nptr
637 static ALWAYS_INLINE auto StrtolImpl(void *ctx, Fn real, const char *nptr,
641 return real(nptr, endptr, base);
643 auto res = real(nptr, &real_endptr, base);
644 StrtolFixAndCheck(ctx, nptr, endptr, real_endptr, base);
649 INTERCEPTOR(ret_type, func, const char *nptr, char **endptr, int base) { \
653 return StrtolImpl(ctx, REAL(func), nptr, endptr, base); \
659 INTERCEPTOR(long, strtol, const char *nptr, char **endptr, int base) {
668 long long result = StrtolImpl(ctx, REAL(strtoll), nptr, endptr, base);
689 INTERCEPTOR(int, atoi, const char *nptr) {
693 return REAL(atoi)(nptr);
696 return REAL(atoi)(nptr);
699 // "man atoi" tells that behavior of atoi(nptr) is the same as
700 // strtol(nptr, 0, 10), i.e. it sets errno to ERANGE if the
703 int result = REAL(strtol)(nptr, &real_endptr, 10);
704 FixRealStrtolEndptr(nptr, &real_endptr);
705 ASAN_READ_STRING(ctx, nptr, (real_endptr - nptr) + 1);
709 INTERCEPTOR(long, atol, const char *nptr) {
713 return REAL(atol)(nptr);
716 return REAL(atol)(nptr);
719 long result = REAL(strtol)(nptr, &real_endptr, 10);
720 FixRealStrtolEndptr(nptr, &real_endptr);
721 ASAN_READ_STRING(ctx, nptr, (real_endptr - nptr) + 1);
725 INTERCEPTOR(long long, atoll, const char *nptr) {
730 return REAL(atoll)(nptr);
733 long long result = REAL(strtoll)(nptr, &real_endptr, 10);
734 FixRealStrtolEndptr(nptr, &real_endptr);
735 ASAN_READ_STRING(ctx, nptr, (real_endptr - nptr) + 1);