MCPcopy Create free account
hub / github.com/F-Stack/f-stack / strncmp

Function strncmp

freebsd/libkern/strncmp.c:37–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35#include <sys/libkern.h>
36
37int
38strncmp(const char *s1, const char *s2, size_t n)
39{
40
41 if (n == 0)
42 return (0);
43 do {
44 if (*s1 != *s2++)
45 return (*(const unsigned char *)s1 -
46 *(const unsigned char *)(s2 - 1));
47 if (*s1++ == '\0')
48 break;
49 } while (--n != 0);
50 return (0);
51}

Callers 15

parse_numericFunction · 0.85
setFunction · 0.85
ifinfoFunction · 0.85
parse_ltFunction · 0.85
kld_isloadedFunction · 0.85
show_statFunction · 0.85
pcblist_sysctlFunction · 0.85
protoprFunction · 0.85
isanyargFunction · 0.85
print_stringFunction · 0.85
ifclonecreateFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by 15

mainFunction · 0.68
udev_device_get_devidFunction · 0.68
mainFunction · 0.68
struct_block_parseFunction · 0.68
cnxk_gpio_validate_attrFunction · 0.68
test_dlb2_eventdevFunction · 0.68
starts_withFunction · 0.68
memzone_walk_clbFunction · 0.68
test_versionFunction · 0.68
test_macrosFunction · 0.68