| /xnu-11215/bsd/vfs/ |
| H A D | doc_tombstone.c | 123 if (strncmp(nameptr, "atmp", 4) == 0 in doc_tombstone_should_ignore_name() 124 || (real_len > 4 && strncmp(nameptr + real_len - 4, ".bak", 4) == 0) in doc_tombstone_should_ignore_name() 125 || (real_len > 4 && strncmp(nameptr + real_len - 4, ".tmp", 4) == 0)) { in doc_tombstone_should_ignore_name()
|
| H A D | vfs_xattr.c | 165 strncmp(name, XATTR_RESOURCEFORK_NAME, sizeof(XATTR_RESOURCEFORK_NAME)) != 0) { in vn_getxattr() 219 strncmp(name, XATTR_RESOURCEFORK_NAME, sizeof(XATTR_RESOURCEFORK_NAME)) != 0) { in vn_setxattr() 410 return !strncmp(attrname, "com.apple.system.", 17); in xattr_protected() 1745 isrsrcfork = strncmp(name, XATTR_RESOURCEFORK_NAME, in default_getxattr_vfs() 1759 if (strncmp(name, XATTR_FINDERINFO_NAME, sizeof(XATTR_FINDERINFO_NAME)) == 0) { in default_getxattr_vfs() 1810 if (strncmp((const char *)entry->name, name, namelen) == 0) { in default_getxattr_vfs() 2056 if (strncmp((const char *)entry->name, name, namelen) == 0) { in default_setxattr_vfs() 2279 isrsrcfork = strncmp(name, XATTR_RESOURCEFORK_NAME, in default_removexattr_vfs() 2361 if (strncmp((const char *)entry->name, name, namelen) == 0) { in default_removexattr_vfs() 2618 isrsrcfork = strncmp(name, XATTR_RESOURCEFORK_NAME, in default_getxattr_doubleagent() [all …]
|
| /xnu-11215/libkern/ |
| H A D | kernel_mach_header.c | 219 if (strncmp(sp->sectname, sectname, in getsectbynamefromseg() 221 strncmp(sp->segname, segname, in getsectbynamefromseg() 253 if (strncmp(sgp->segname, segname, sizeof(sgp->segname)) == 0 || in getsectbynamefromheader() 281 && !strncmp(sgp->segname, seg_name, sizeof(sgp->segname))) { in getsegbynamefromheader()
|
| /xnu-11215/tools/tests/personas/ |
| H A D | persona_mgr.c | 243 if (strncmp(optarg, "guest", 6) == 0) { in main() 245 } else if (strncmp(optarg, "managed", 8) == 0) { in main() 247 } else if (strncmp(optarg, "priv", 4) == 0) { /* shortcut... */ in main() 249 } else if (strncmp(optarg, "system", 7) == 0) { in main()
|
| /xnu-11215/libkern/os/ |
| H A D | internal.c | 36 if (strncmp(sgp->segname, SEG_TEXT, sizeof(sgp->segname)) == 0) { in _os_trace_addr_in_text_segment_32() 54 if (strncmp(sgp->segname, SEG_TEXT, sizeof(sgp->segname)) == 0) { in _os_trace_addr_in_text_segment_64()
|
| /xnu-11215/libsyscall/wrappers/ |
| H A D | system-version-compat.c | 79 …if (strncmp(&orig_path[path_str_len - SYSTEM_VERSION_PLIST_FILENAMELEN], SYSTEM_VERSION_PLIST_FILE… in _system_version_compat_check_path_suffix() 164 if (strncmp(new_path, SYSTEM_VERSION_PLIST_PATH, SYSTEM_VERSION_PLIST_PATHLEN) != 0) { in _system_version_compat_open_shim()
|
| H A D | _libc_funcptr.c | 289 strncmp(const char *s1, const char *s2, size_t n) in strncmp() function 291 return _libkernel_string_functions->strncmp(s1, s2, n); in strncmp()
|
| H A D | _libkernel_init.h | 106 int (*strncmp)(const char *s1, const char *s2, size_t n); member
|
| /xnu-11215/doc/primitives/ |
| H A D | string-handling.md | 20 ## Replacing `strncmp` 22 `strncmp` is always wrong with -fbounds-safety, and it's unavailable as a 26 | strncmp(first, secnd, n) | __null_terminated first | __indexable first | 31 Using `strncmp` with two NUL-terminated strings is uncommon and it has no 62 for a NUL terminator. `strn` functions for reading (`strncmp`, `strnlen`) are 63 _generally_ safe, but `strncmp` can cause confusion over which string is bound 225 if (strncmp(f->buf1, f->buf2, sizeof(f->buf1)) == 0) { /* ... */ } 240 That is, to implement `bar`, you have a choice of `strcmp`, `strncmp` and 246 `strbufcmp`, `strlcmp` or even `strcmp` over `strncmp` (depending on whether
|
| /xnu-11215/tests/vm_memory_tests_src/ |
| H A D | vm_tests.c | 328 if (strncmp(src_val, dst_val, 64)) { in mach_server_make_memory_entry() 335 if (strncmp(src_val, dst_val, 64) == 0) { in mach_server_make_memory_entry() 342 if (strncmp(src_val, dst_val, 64)) { in mach_server_make_memory_entry() 496 if (strncmp(src_val, dst_val, 64)) { in mach_server_read() 501 if (strncmp(src_val, dst_val, 64) == 0) { in mach_server_read() 612 if (strncmp(src_val, dst_val, 64)) { in mach_server_remap()
|
| /xnu-11215/bsd/miscfs/mockfs/ |
| H A D | mockfs_vnops.c | 120 if (!strncmp(cnp->cn_nameptr, "sbin", 5)) { in mockfs_lookup() 122 } else if (!strncmp(cnp->cn_nameptr, "dev", 4)) { in mockfs_lookup() 124 } else if (!strncmp(cnp->cn_nameptr, "launchd", 8)) { in mockfs_lookup()
|
| /xnu-11215/tests/vfs/ |
| H A D | getattrlist_mountextflags.c | 89 if (strncmp(mntbuf[i].f_mntfromname, FSTYPE_MSDOS, strlen(FSTYPE_MSDOS))) { in get_mount_path() 195 T_ASSERT_EQ(strncmp(attrbuf.fstypename, fstypename, strlen(fstypename)), 0, in test_getattrlist()
|
| /xnu-11215/tests/cpu_counters/ |
| H A D | cpc_security_tests.c | 149 if (strncmp(name, "FIXED", strlen("FIXED")) == 0) { in check_secure_cpmu() 279 if (strncmp(name, "FIXED", strlen("FIXED")) == 0) { in check_event_coverage() 354 if (strncmp(name, "FIXED", strlen("FIXED")) != 0) {
|
| /xnu-11215/tests/nvram_tests/ |
| H A D | nvram_helper.c | 265 if (strncmp(name, kIONVRAMDeletePropertyKey, strlen(kIONVRAMDeletePropertyKey)) == 0 || in SetVariable() 266 strncmp(name, kIONVRAMDeletePropertyKeyWRet, strlen(kIONVRAMDeletePropertyKeyWRet)) == 0 || in SetVariable() 267 strncmp(name, kIONVRAMSyncNowPropertyKey, strlen(kIONVRAMSyncNowPropertyKey)) == 0) { in SetVariable()
|
| /xnu-11215/libkern/kxld/ |
| H A D | kxld_seg.c | 853 if (!strncmp(seg->segname, SEG_TEXT, sizeof(seg->segname))) { in kxld_seg_set_vm_protections() 1013 result = !strncmp(seg->segname, SEG_TEXT, sizeof(seg->segname)); in kxld_seg_is_text_seg() 1024 result = !strncmp(seg->segname, "__TEXT_EXEC", sizeof(seg->segname)); in kxld_seg_is_text_exec_seg() 1035 result = !strncmp(seg->segname, SEG_DATA, sizeof(seg->segname)); in kxld_seg_is_data_seg() 1046 result = !strncmp(seg->segname, "__DATA_CONST", sizeof(seg->segname)); in kxld_seg_is_data_const_seg() 1057 result = !strncmp(seg->segname, SEG_LINKEDIT, sizeof(seg->segname)); in kxld_seg_is_linkedit_seg() 1068 result = !strncmp(seg->segname, "__LLVM_COV", sizeof(seg->segname)); in kxld_seg_is_llvm_cov_seg()
|
| /xnu-11215/SETUP/setsegname/ |
| H A D | setsegname.c | 242 0 != strncmp(ignoreseg_name, (char *)names, sizeof(*names)))) { in main() 244 0 == strncmp(oldseg_name, (char *)names, sizeof(*names))) { in main()
|
| /xnu-11215/libsyscall/wrappers/string/ |
| H A D | strings.h | 69 int strncmp(const char *, const char *, size_t);
|
| /xnu-11215/bsd/tests/ |
| H A D | copyio_tests.c | 231 int cmp = strncmp(in_buf, copyio_test_string, lencopied); in copyinstr_test() 260 cmp = strncmp(in_buf, copyio_test_string, lencopied); in copyinstr_test() 300 int cmp = strncmp(data->kern_addr, copyio_test_string, sizeof(copyio_test_string)); in copyoutstr_test() 311 cmp = strncmp(data->kern_addr, copyio_test_string, trunc_size); in copyoutstr_test() 332 cmp = strncmp(data->kern_addr, copyio_test_string, sizeof(copyio_test_string)); in copyoutstr_test()
|
| /xnu-11215/bsd/dev/dtrace/ |
| H A D | sdt_subr.c | 1182 if (strncmp(sdp->sdp_provider->sdtp_name, a->sda_provider, strlen(a->sda_provider) + 1) != 0) { in sdt_getargdesc() 1187 strncmp(sdp->sdp_name, a->sda_name, strlen(a->sda_name) + 1) != 0) { in sdt_getargdesc()
|
| /xnu-11215/tests/vm/ |
| H A D | neural_footprint.c | 96 if (!strncmp(templateInfo[i].lti_name, in ledger_init() 101 } else if (!strncmp(templateInfo[i].lti_name, in ledger_init() 106 } else if (!strncmp(templateInfo[i].lti_name, in ledger_init() 111 } else if (!strncmp(templateInfo[i].lti_name, in ledger_init() 116 } else if (!strncmp(templateInfo[i].lti_name, in ledger_init()
|
| /xnu-11215/libsa/ |
| H A D | bootstrap.cpp | 440 if (strncmp(devTreeNameCString, in readBooterExtensions() 537 (strncmp(bundle_id, COM_APPLE, CONST_STRLEN(COM_APPLE)) != 0)) { in loadSecurityExtensions() 641 (strncmp(bundle_id, COM_APPLE_KEC, CONST_STRLEN(COM_APPLE_KEC)) != 0)) { in loadKernelExternalComponents()
|
| /xnu-11215/SETUP/config/ |
| H A D | mkmakefile.c | 221 if (profiling && strncmp(line, "COPTS=", 6) == 0) { in makefile() 360 if (strncmp(this, "OPTIONS/", 8) == 0) { in read_files() 743 if (profiling && (strncmp(line, "LIBS=", 5) == 0)) { in do_machdep() 914 if (!strncmp(makbuf, OLDSALUTATION, oldlen)) { in copy_dependencies()
|
| /xnu-11215/tests/ |
| H A D | verify_kalloc_config.c | 41 if (strncmp(z_name, kalloc_str, strlen(kalloc_str)) == 0) { in run_test()
|
| /xnu-11215/osfmk/kern/ |
| H A D | task_ref.c | 502 if (strncmp(config, "full", sizeof(config)) == 0) { in task_ref_init() 505 if (strncmp(config, "off", sizeof(config)) == 0) { in task_ref_init()
|
| H A D | core_analytics.c | 64 if (strncmp(field_spec, ca_str_prefix, ca_str_len) == 0) { in core_analytics_field_is_string()
|