MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rt_memcmp

Function rt_memcmp

src/klibc/kstring.c:256–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254 */
255#ifndef RT_KLIBC_USING_USER_MEMCMP
256rt_int32_t rt_memcmp(const void *cs, const void *ct, rt_size_t count)
257{
258#ifdef RT_KLIBC_USING_LIBC_MEMCMP
259 return memcmp(cs, ct, count);
260#else
261 const unsigned char *su1 = RT_NULL, *su2 = RT_NULL;
262 int res = 0;
263
264 for (su1 = (const unsigned char *)cs, su2 = (const unsigned char *)ct; 0 < count; ++su1, ++su2, count--)
265 if ((res = *su1 - *su2) != 0)
266 break;
267
268 return res;
269#endif /* RT_KLIBC_USING_LIBC_MEMCMP */
270}
271#endif /* RT_KLIBC_USING_USER_MEMCMP */
272RTM_EXPORT(rt_memcmp);
273

Callers 15

validate_vdso_elfFunction · 0.85
rt_wlan_cfg_saveFunction · 0.85
wifi_info_isequFunction · 0.85
wifi_scan_result_cacheFunction · 0.85
user_ap_info_callbackFunction · 0.85
rt_wlan_sta_info_delFunction · 0.85
rt_wlan_connect_advFunction · 0.85
rt_wlan_start_ap_advFunction · 0.85
rt_wlan_ap_deauth_staFunction · 0.85
efi_guidcmpFunction · 0.85

Calls

no outgoing calls

Tested by 7

utest_do_runFunction · 0.68
utest_assert_bufFunction · 0.68
nand_thread_entryFunction · 0.68
sdmmc_thread_entryFunction · 0.68
w25q_write_read_dataFunction · 0.68
vector_childFunction · 0.68
test_contextFunction · 0.68