Lines Matching refs:s2

62 static int internal_strcmp_strncmp(const char *s1, const char *s2, bool strncmp,
72 unsigned c2 = *s2;
78 s2++;
83 static int internal_strncmp(const char *s1, const char *s2, size_t n) {
84 return internal_strcmp_strncmp(s1, s2, true, n);
87 static int internal_strcmp(const char *s1, const char *s2) {
88 return internal_strcmp_strncmp(s1, s2, false, 0);
91 static int internal_memcmp(const void *s1, const void *s2, size_t n) {
93 const uint8_t *t2 = static_cast<const uint8_t *>(s2);
125 const void *s2, size_t n, int result);
127 const char *s2, size_t n, int result);
129 const char *s2, size_t n, int result);
131 const char *s2, int result);
133 const char *s2, int result);
135 const char *s2, char *result);
137 const char *s2, char *result);
139 const void *s2, size_t len2, void *result);
151 ATTRIBUTE_INTERFACE int bcmp(const char *s1, const char *s2, size_t n) {
153 return internal_memcmp(s1, s2, n);
154 int result = REAL(bcmp)(s1, s2, n);
155 __sanitizer_weak_hook_memcmp(GET_CALLER_PC(), s1, s2, n, result);
159 ATTRIBUTE_INTERFACE int memcmp(const void *s1, const void *s2, size_t n) {
161 return internal_memcmp(s1, s2, n);
162 int result = REAL(memcmp)(s1, s2, n);
163 __sanitizer_weak_hook_memcmp(GET_CALLER_PC(), s1, s2, n, result);
167 ATTRIBUTE_INTERFACE int strncmp(const char *s1, const char *s2, size_t n) {
169 return internal_strncmp(s1, s2, n);
170 int result = REAL(strncmp)(s1, s2, n);
171 __sanitizer_weak_hook_strncmp(GET_CALLER_PC(), s1, s2, n, result);
175 ATTRIBUTE_INTERFACE int strcmp(const char *s1, const char *s2) {
177 return internal_strcmp(s1, s2);
178 int result = REAL(strcmp)(s1, s2);
179 __sanitizer_weak_hook_strcmp(GET_CALLER_PC(), s1, s2, result);
183 ATTRIBUTE_INTERFACE int strncasecmp(const char *s1, const char *s2, size_t n) {
185 int result = REAL(strncasecmp)(s1, s2, n);
186 __sanitizer_weak_hook_strncasecmp(GET_CALLER_PC(), s1, s2, n, result);
190 ATTRIBUTE_INTERFACE int strcasecmp(const char *s1, const char *s2) {
192 int result = REAL(strcasecmp)(s1, s2);
193 __sanitizer_weak_hook_strcasecmp(GET_CALLER_PC(), s1, s2, result);
197 ATTRIBUTE_INTERFACE char *strstr(const char *s1, const char *s2) {
199 return internal_strstr(s1, s2);
200 char *result = REAL(strstr)(s1, s2);
201 __sanitizer_weak_hook_strstr(GET_CALLER_PC(), s1, s2, result);
205 ATTRIBUTE_INTERFACE char *strcasestr(const char *s1, const char *s2) {
207 char *result = REAL(strcasestr)(s1, s2);
208 __sanitizer_weak_hook_strcasestr(GET_CALLER_PC(), s1, s2, result);
213 void *memmem(const void *s1, size_t len1, const void *s2, size_t len2) {
215 void *result = REAL(memmem)(s1, len1, s2, len2);
216 __sanitizer_weak_hook_memmem(GET_CALLER_PC(), s1, len1, s2, len2, result);