/third_party/python/Objects/stringlib/ |
H A D | split.h | 55 const STRINGLIB_CHAR* str, Py_ssize_t str_len, in split_whitespace() 67 while (i < str_len && STRINGLIB_ISSPACE(str[i])) in split_whitespace() 69 if (i == str_len) break; in split_whitespace() 71 while (i < str_len && !STRINGLIB_ISSPACE(str[i])) in split_whitespace() 74 if (j == 0 && i == str_len && STRINGLIB_CHECK_EXACT(str_obj)) { in split_whitespace() 85 if (i < str_len) { in split_whitespace() 88 while (i < str_len && STRINGLIB_ISSPACE(str[i])) in split_whitespace() 90 if (i != str_len) in split_whitespace() 91 SPLIT_ADD(str, i, str_len); in split_whitespace() 103 const STRINGLIB_CHAR* str, Py_ssize_t str_len, in split_char() 54 split_whitespace(PyObject* str_obj, const STRINGLIB_CHAR* str, Py_ssize_t str_len, Py_ssize_t maxcount) split_whitespace() argument 102 split_char(PyObject* str_obj, const STRINGLIB_CHAR* str, Py_ssize_t str_len, const STRINGLIB_CHAR ch, Py_ssize_t maxcount) split_char() argument 145 split(PyObject* str_obj, const STRINGLIB_CHAR* str, Py_ssize_t str_len, const STRINGLIB_CHAR* sep, Py_ssize_t sep_len, Py_ssize_t maxcount) split() argument 193 rsplit_whitespace(PyObject* str_obj, const STRINGLIB_CHAR* str, Py_ssize_t str_len, Py_ssize_t maxcount) rsplit_whitespace() argument 243 rsplit_char(PyObject* str_obj, const STRINGLIB_CHAR* str, Py_ssize_t str_len, const STRINGLIB_CHAR ch, Py_ssize_t maxcount) rsplit_char() argument 287 rsplit(PyObject* str_obj, const STRINGLIB_CHAR* str, Py_ssize_t str_len, const STRINGLIB_CHAR* sep, Py_ssize_t sep_len, Py_ssize_t maxcount) rsplit() argument 336 splitlines(PyObject* str_obj, const STRINGLIB_CHAR* str, Py_ssize_t str_len, int keepends) splitlines() argument [all...] |
H A D | find.h | 8 STRINGLIB(find)(const STRINGLIB_CHAR* str, Py_ssize_t str_len, in find() argument 14 assert(str_len >= 0); in find() 18 pos = FASTSEARCH(str, str_len, sub, sub_len, -1, FAST_SEARCH); in find() 27 STRINGLIB(rfind)(const STRINGLIB_CHAR* str, Py_ssize_t str_len, in rfind() argument 33 assert(str_len >= 0); in rfind() 35 return str_len + offset; in rfind() 37 pos = FASTSEARCH(str, str_len, sub, sub_len, -1, FAST_RSEARCH); in rfind() 46 STRINGLIB(find_slice)(const STRINGLIB_CHAR* str, Py_ssize_t str_len, in find_slice() argument 54 STRINGLIB(rfind_slice)(const STRINGLIB_CHAR* str, Py_ssize_t str_len, in rfind_slice() argument
|
H A D | count.h | 8 STRINGLIB(count)(const STRINGLIB_CHAR* str, Py_ssize_t str_len, in count() argument 14 if (str_len < 0) in count() 17 return (str_len < maxcount) ? str_len + 1 : maxcount; in count() 19 count = FASTSEARCH(str, str_len, sub, sub_len, maxcount, FAST_COUNT); in count()
|
H A D | partition.h | 14 const STRINGLIB_CHAR* str, Py_ssize_t str_len, in partition() 30 pos = FASTSEARCH(str, str_len, sep, sep_len, -1, FAST_SEARCH); in partition() 34 PyTuple_SET_ITEM(out, 0, STRINGLIB_NEW(str, str_len)); in partition() 59 PyTuple_SET_ITEM(out, 2, STRINGLIB_NEW(str + pos, str_len - pos)); in partition() 71 const STRINGLIB_CHAR* str, Py_ssize_t str_len, in rpartition() 87 pos = FASTSEARCH(str, str_len, sep, sep_len, -1, FAST_RSEARCH); in rpartition() 93 PyTuple_SET_ITEM(out, 2, STRINGLIB_NEW(str, str_len)); in rpartition() 116 PyTuple_SET_ITEM(out, 2, STRINGLIB_NEW(str + pos, str_len - pos)); in rpartition() 13 partition(PyObject* str_obj, const STRINGLIB_CHAR* str, Py_ssize_t str_len, PyObject* sep_obj, const STRINGLIB_CHAR* sep, Py_ssize_t sep_len) partition() argument 70 rpartition(PyObject* str_obj, const STRINGLIB_CHAR* str, Py_ssize_t str_len, PyObject* sep_obj, const STRINGLIB_CHAR* sep, Py_ssize_t sep_len) rpartition() argument
|
/third_party/ltp/testcases/kernel/syscalls/mmap/ |
H A D | mmap17.c | 44 int str_len; in cleanup() local 46 str_len = strlen(str); in cleanup() 53 SAFE_MUNMAP(mapped_address, str_len); in cleanup() 58 int str_len; in test_mmap() local 61 str_len = strlen(str); in test_mmap() 63 SAFE_WRITE(SAFE_WRITE_ALL, fd_file1, str, str_len); in test_mmap() 64 mapped_address = SAFE_MMAP(NULL, str_len, PROT_WRITE, in test_mmap() 67 SAFE_WRITE(SAFE_WRITE_ALL, fd_file2, str, str_len); in test_mmap() 69 address = mmap(mapped_address, str_len, PROT_WRITE, in test_mmap()
|
/kernel/linux/linux-5.10/fs/hmdfs/comm/ |
H A D | message_verify.c | 274 static int is_str_msg_valid(char *msg, int str_len[], size_t str_num) in is_str_msg_valid() argument 280 if (msg[pos + str_len[i]] != '\0' || in is_str_msg_valid() 281 strnlen(msg + pos, PATH_MAX) != str_len[i]) in is_str_msg_valid() 283 pos += str_len[i] + 1; in is_str_msg_valid() 292 int str_len[] = { req->path_len }; in verify_open_req() local 300 str_len[0] = req->path_len; in verify_open_req() 301 if (is_str_msg_valid(req->buf, str_len, sizeof(str_len) / sizeof(int))) in verify_open_req() 331 int str_len[] = { req->path_len, req->file_len}; in verify_atomic_open_req() local 340 if (is_str_msg_valid(req->buf, str_len, sizeo in verify_atomic_open_req() 370 int str_len[] = { req->path_len }; verify_iterate_req() local 398 int str_len[] = { req->path_len, req->name_len }; verify_mkdir_req() local 437 int str_len[] = { req->path_len, req->name_len }; verify_create_req() local 476 int str_len[] = { req->path_len, req->name_len }; verify_rmdir_req() local 505 int str_len[] = { req->path_len, req->name_len }; verify_unlink_req() local 534 int str_len[] = { req->old_path_len, req->new_path_len, verify_rename_req() local 568 int str_len[] = { req->path_len }; verify_setattr_req() local 597 int str_len[] = { req->path_len }; verify_getattr_req() local 635 int str_len[] = { req->path_len, req->name_len}; verify_getxattr_req() local 684 int str_len[] = { req->path_len, req->name_len}; verify_setxattr_req() local 718 int str_len[] = { req->path_len }; verify_listxattr_req() local 796 int str_len[] = { req->path_len }; verify_statfs_req() local 834 int str_len[] = { req->path_len }; verify_drop_push_req() local [all...] |
/kernel/linux/linux-6.6/fs/hmdfs/comm/ |
H A D | message_verify.c | 274 static int is_str_msg_valid(char *msg, int str_len[], size_t str_num) in is_str_msg_valid() argument 280 if (msg[pos + str_len[i]] != '\0' || in is_str_msg_valid() 281 strnlen(msg + pos, PATH_MAX) != str_len[i]) in is_str_msg_valid() 283 pos += str_len[i] + 1; in is_str_msg_valid() 292 int str_len[] = { req->path_len }; in verify_open_req() local 300 str_len[0] = req->path_len; in verify_open_req() 301 if (is_str_msg_valid(req->buf, str_len, sizeof(str_len) / sizeof(int))) in verify_open_req() 331 int str_len[] = { req->path_len, req->file_len}; in verify_atomic_open_req() local 340 if (is_str_msg_valid(req->buf, str_len, sizeo in verify_atomic_open_req() 370 int str_len[] = { req->path_len }; verify_iterate_req() local 398 int str_len[] = { req->path_len, req->name_len }; verify_mkdir_req() local 437 int str_len[] = { req->path_len, req->name_len }; verify_create_req() local 476 int str_len[] = { req->path_len, req->name_len }; verify_rmdir_req() local 505 int str_len[] = { req->path_len, req->name_len }; verify_unlink_req() local 534 int str_len[] = { req->old_path_len, req->new_path_len, verify_rename_req() local 568 int str_len[] = { req->path_len }; verify_setattr_req() local 597 int str_len[] = { req->path_len }; verify_getattr_req() local 635 int str_len[] = { req->path_len, req->name_len}; verify_getxattr_req() local 684 int str_len[] = { req->path_len, req->name_len}; verify_setxattr_req() local 718 int str_len[] = { req->path_len }; verify_listxattr_req() local 796 int str_len[] = { req->path_len }; verify_statfs_req() local 834 int str_len[] = { req->path_len }; verify_drop_push_req() local [all...] |
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/wps/ |
H A D | wps_dev_attr.c | 246 size_t str_len) in wps_process_manufacturer() 253 wpa_hexdump_ascii(MSG_DEBUG, "WPS: Manufacturer", str, str_len); in wps_process_manufacturer() 256 dev->manufacturer = dup_binstr(str, str_len); in wps_process_manufacturer() 265 size_t str_len) in wps_process_model_name() 272 wpa_hexdump_ascii(MSG_DEBUG, "WPS: Model Name", str, str_len); in wps_process_model_name() 275 dev->model_name = dup_binstr(str, str_len); in wps_process_model_name() 284 size_t str_len) in wps_process_model_number() 291 wpa_hexdump_ascii(MSG_DEBUG, "WPS: Model Number", str, str_len); in wps_process_model_number() 294 dev->model_number = dup_binstr(str, str_len); in wps_process_model_number() 303 const u8 *str, size_t str_len) in wps_process_serial_number() 245 wps_process_manufacturer(struct wps_device_data *dev, const u8 *str, size_t str_len) wps_process_manufacturer() argument 264 wps_process_model_name(struct wps_device_data *dev, const u8 *str, size_t str_len) wps_process_model_name() argument 283 wps_process_model_number(struct wps_device_data *dev, const u8 *str, size_t str_len) wps_process_model_number() argument 302 wps_process_serial_number(struct wps_device_data *dev, const u8 *str, size_t str_len) wps_process_serial_number() argument 321 wps_process_dev_name(struct wps_device_data *dev, const u8 *str, size_t str_len) wps_process_dev_name() argument [all...] |
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/wps/ |
H A D | wps_dev_attr.c | 261 size_t str_len) in wps_process_manufacturer() 268 wpa_hexdump_ascii(MSG_DEBUG, "WPS: Manufacturer", str, str_len); in wps_process_manufacturer() 271 dev->manufacturer = dup_binstr(str, str_len); in wps_process_manufacturer() 280 size_t str_len) in wps_process_model_name() 287 wpa_hexdump_ascii(MSG_DEBUG, "WPS: Model Name", str, str_len); in wps_process_model_name() 290 dev->model_name = dup_binstr(str, str_len); in wps_process_model_name() 299 size_t str_len) in wps_process_model_number() 306 wpa_hexdump_ascii(MSG_DEBUG, "WPS: Model Number", str, str_len); in wps_process_model_number() 309 dev->model_number = dup_binstr(str, str_len); in wps_process_model_number() 318 const u8 *str, size_t str_len) in wps_process_serial_number() 260 wps_process_manufacturer(struct wps_device_data *dev, const u8 *str, size_t str_len) wps_process_manufacturer() argument 279 wps_process_model_name(struct wps_device_data *dev, const u8 *str, size_t str_len) wps_process_model_name() argument 298 wps_process_model_number(struct wps_device_data *dev, const u8 *str, size_t str_len) wps_process_model_number() argument 317 wps_process_serial_number(struct wps_device_data *dev, const u8 *str, size_t str_len) wps_process_serial_number() argument 336 wps_process_dev_name(struct wps_device_data *dev, const u8 *str, size_t str_len) wps_process_dev_name() argument [all...] |
/kernel/linux/linux-5.10/security/selinux/ |
H A D | xfrm.c | 81 u32 str_len; in selinux_xfrm_alloc_user() local 88 str_len = uctx->ctx_len; in selinux_xfrm_alloc_user() 89 if (str_len >= PAGE_SIZE) in selinux_xfrm_alloc_user() 92 ctx = kmalloc(sizeof(*ctx) + str_len + 1, gfp); in selinux_xfrm_alloc_user() 98 ctx->ctx_len = str_len; in selinux_xfrm_alloc_user() 99 memcpy(ctx->ctx_str, &uctx[1], str_len); in selinux_xfrm_alloc_user() 100 ctx->ctx_str[str_len] = '\0'; in selinux_xfrm_alloc_user() 101 rc = security_context_to_sid(&selinux_state, ctx->ctx_str, str_len, in selinux_xfrm_alloc_user() 350 u32 str_len; in selinux_xfrm_state_alloc_acquire() local 359 &str_len); in selinux_xfrm_state_alloc_acquire() [all...] |
/kernel/linux/linux-6.6/security/selinux/ |
H A D | xfrm.c | 81 u32 str_len; in selinux_xfrm_alloc_user() local 88 str_len = uctx->ctx_len; in selinux_xfrm_alloc_user() 89 if (str_len >= PAGE_SIZE) in selinux_xfrm_alloc_user() 92 ctx = kmalloc(struct_size(ctx, ctx_str, str_len + 1), gfp); in selinux_xfrm_alloc_user() 98 ctx->ctx_len = str_len; in selinux_xfrm_alloc_user() 99 memcpy(ctx->ctx_str, &uctx[1], str_len); in selinux_xfrm_alloc_user() 100 ctx->ctx_str[str_len] = '\0'; in selinux_xfrm_alloc_user() 101 rc = security_context_to_sid(ctx->ctx_str, str_len, in selinux_xfrm_alloc_user() 347 u32 str_len; in selinux_xfrm_state_alloc_acquire() local 356 &str_len); in selinux_xfrm_state_alloc_acquire() [all...] |
/kernel/linux/linux-6.6/tools/power/cpupower/utils/helpers/ |
H A D | misc.c | 192 int str_len = 0; in print_online_cpus() local 195 str_len = online_cpus->size * 5; in print_online_cpus() 196 online_cpus_str = (void *)malloc(sizeof(char) * str_len); in print_online_cpus() 199 bitmask_displaylist(online_cpus_str, str_len, online_cpus); in print_online_cpus() 210 int str_len = 0; in print_offline_cpus() local 213 str_len = offline_cpus->size * 5; in print_offline_cpus() 214 offline_cpus_str = (void *)malloc(sizeof(char) * str_len); in print_offline_cpus() 217 bitmask_displaylist(offline_cpus_str, str_len, offline_cpus); in print_offline_cpus()
|
/third_party/libsnd/src/ |
H A D | strings.c | 33 size_t str_len ; in psf_store_string() local 39 str_len = strlen (str) ; in psf_store_string() 48 if (str_type != SF_STR_SOFTWARE && str_len == 0) in psf_store_string() 126 str_len = strlen (str) + 1 ; in psf_store_string() 128 if (psf->strings.storage_used + str_len + 1 > psf->strings.storage_len) in psf_store_string() 130 size_t newlen = 2 * psf->strings.storage_len + str_len + 1 ; in psf_store_string() 146 memcpy (psf->strings.storage + psf->strings.storage_used, str, str_len) ; in psf_store_string() 147 psf->strings.storage_used += str_len ; in psf_store_string()
|
/kernel/linux/linux-5.10/drivers/gpu/drm/amd/display/amdgpu_dm/ |
H A D | amdgpu_dm_debugfs.c | 188 uint8_t str_len = 0; in dp_link_settings_read() local 200 str_len = strlen("Current: %d 0x%x %d "); in dp_link_settings_read() 201 snprintf(rd_buf_ptr, str_len, "Current: %d 0x%x %d ", in dp_link_settings_read() 205 rd_buf_ptr += str_len; in dp_link_settings_read() 207 str_len = strlen("Verified: %d 0x%x %d "); in dp_link_settings_read() 208 snprintf(rd_buf_ptr, str_len, "Verified: %d 0x%x %d ", in dp_link_settings_read() 212 rd_buf_ptr += str_len; in dp_link_settings_read() 214 str_len = strlen("Reported: %d 0x%x %d "); in dp_link_settings_read() 215 snprintf(rd_buf_ptr, str_len, "Reported: %d 0x%x %d ", in dp_link_settings_read() 219 rd_buf_ptr += str_len; in dp_link_settings_read() 1182 int i, r, str_len = 30; dp_dsc_clock_en_read() local 1338 int i, r, str_len = 30; dp_dsc_slice_width_read() local 1492 int i, r, str_len = 30; dp_dsc_slice_height_read() local 1642 int i, r, str_len = 30; dp_dsc_bits_per_pixel_read() local 1787 int i, r, str_len = 30; dp_dsc_pic_width_read() local 1844 int i, r, str_len = 30; dp_dsc_pic_height_read() local 1916 int i, r, str_len = 30; dp_dsc_chunk_size_read() local 1988 int i, r, str_len = 30; dp_dsc_slice_bpg_offset_read() local [all...] |
/kernel/linux/linux-5.10/tools/power/acpi/os_specific/service_layers/ |
H A D | osunixdir.c | 95 int str_len; in acpi_os_get_next_filename() local 106 str_len = strlen(dir_entry->d_name) + in acpi_os_get_next_filename() 109 temp_str = calloc(str_len, 1); in acpi_os_get_next_filename()
|
/kernel/linux/linux-6.6/tools/power/acpi/os_specific/service_layers/ |
H A D | osunixdir.c | 95 int str_len; in acpi_os_get_next_filename() local 106 str_len = strlen(dir_entry->d_name) + in acpi_os_get_next_filename() 109 temp_str = calloc(str_len, 1); in acpi_os_get_next_filename()
|
/kernel/linux/linux-5.10/lib/ |
H A D | parser.c | 60 size_t str_len = strlen(s); in match_one() local 62 if (str_len == 0) in match_one() 64 if (len == -1 || len > str_len) in match_one() 65 len = str_len; in match_one()
|
/kernel/linux/linux-6.6/lib/ |
H A D | parser.c | 69 size_t str_len = strlen(s); in match_one() local 71 if (str_len == 0) in match_one() 73 if (len == -1 || len > str_len) in match_one() 74 len = str_len; in match_one()
|
/third_party/node/test/node-api/1_hello_world/ |
H A D | binding.c | 8 size_t str_len = strlen(str); in Method() local 9 NODE_API_CALL(env, napi_create_string_utf8(env, str, str_len, &world)); in Method()
|
/third_party/node/test/node-api/test_policy/ |
H A D | binding.c | 8 size_t str_len = strlen(str); in Method() local 9 NODE_API_CALL(env, napi_create_string_utf8(env, str, str_len, &world)); in Method()
|
/kernel/linux/linux-6.6/drivers/gpu/drm/amd/display/amdgpu_dm/ |
H A D | amdgpu_dm_debugfs.c | 193 uint8_t str_len = 0; in dp_link_settings_read() local 205 str_len = strlen("Current: %d 0x%x %d "); in dp_link_settings_read() 206 snprintf(rd_buf_ptr, str_len, "Current: %d 0x%x %d ", in dp_link_settings_read() 210 rd_buf_ptr += str_len; in dp_link_settings_read() 212 str_len = strlen("Verified: %d 0x%x %d "); in dp_link_settings_read() 213 snprintf(rd_buf_ptr, str_len, "Verified: %d 0x%x %d ", in dp_link_settings_read() 217 rd_buf_ptr += str_len; in dp_link_settings_read() 219 str_len = strlen("Reported: %d 0x%x %d "); in dp_link_settings_read() 220 snprintf(rd_buf_ptr, str_len, "Reported: %d 0x%x %d ", in dp_link_settings_read() 224 rd_buf_ptr += str_len; in dp_link_settings_read() 1456 int i, r, str_len = 10; dp_dsc_clock_en_read() local 1642 int i, r, str_len = 30; dp_dsc_slice_width_read() local 1826 int i, r, str_len = 30; dp_dsc_slice_height_read() local 2006 int i, r, str_len = 30; dp_dsc_bits_per_pixel_read() local 2181 int i, r, str_len = 30; dp_dsc_pic_width_read() local 2237 int i, r, str_len = 30; dp_dsc_pic_height_read() local 2308 int i, r, str_len = 30; dp_dsc_chunk_size_read() local 2379 int i, r, str_len = 30; dp_dsc_slice_bpg_offset_read() local [all...] |
/kernel/linux/linux-5.10/drivers/s390/net/ |
H A D | qeth_l3_sys.c | 370 int str_len = 0; in qeth_l3_dev_ipato_add_show() local 388 if (entry_len + 1 > PAGE_SIZE - str_len - 1) in qeth_l3_dev_ipato_add_show() 391 entry_len = scnprintf(buf, PAGE_SIZE - str_len, in qeth_l3_dev_ipato_add_show() 393 str_len += entry_len; in qeth_l3_dev_ipato_add_show() 398 return str_len ? str_len : scnprintf(buf, PAGE_SIZE, "\n"); in qeth_l3_dev_ipato_add_show() 590 int str_len = 0; in qeth_l3_dev_ip_add_show() local 607 if (entry_len + 1 > PAGE_SIZE - str_len - 1) in qeth_l3_dev_ip_add_show() 610 entry_len = scnprintf(buf, PAGE_SIZE - str_len, "%s\n", in qeth_l3_dev_ip_add_show() 612 str_len in qeth_l3_dev_ip_add_show() [all...] |
/third_party/selinux/libsepol/cil/src/ |
H A D | cil.c | 1427 size_t str_len = 0; in cil_userprefixes_to_string() local 1445 str_len += strlen("user ") + strlen(user->datum.fqn) + strlen(" prefix ") + strlen(userprefix->prefix_str) + 2; in cil_userprefixes_to_string() 1448 *size = str_len * sizeof(char); in cil_userprefixes_to_string() 1449 str_len++; in cil_userprefixes_to_string() 1450 str_tmp = cil_malloc(str_len * sizeof(char)); in cil_userprefixes_to_string() 1457 buf_pos = snprintf(str_tmp, str_len, "user %s prefix %s;\n", user->datum.fqn, in cil_userprefixes_to_string() 1465 str_len -= buf_pos; in cil_userprefixes_to_string() 1551 int str_len = 0; in __cil_level_strlen() local 1557 str_len += strlen(lvl->sens->datum.fqn); in __cil_level_strlen() 1560 str_len in __cil_level_strlen() 1664 size_t str_len = 0; cil_selinuxusers_to_string() local 1723 size_t str_len = 0; cil_filecons_to_string() local [all...] |
/kernel/linux/linux-5.10/tools/lib/bpf/ |
H A D | libbpf_probes.c | 147 const char *str_sec, size_t str_len) in libbpf__load_raw_btf() 155 .str_len = str_len, in libbpf__load_raw_btf() 160 btf_len = hdr.hdr_len + hdr.type_len + hdr.str_len; in libbpf__load_raw_btf() 167 memcpy(raw_btf + hdr.hdr_len + hdr.type_len, str_sec, hdr.str_len); in libbpf__load_raw_btf() 146 libbpf__load_raw_btf(const char *raw_types, size_t types_len, const char *str_sec, size_t str_len) libbpf__load_raw_btf() argument
|
/kernel/linux/linux-6.6/tools/lib/bpf/ |
H A D | libbpf_probes.c | 222 const char *str_sec, size_t str_len) in libbpf__load_raw_btf() 230 .str_len = str_len, in libbpf__load_raw_btf() 235 btf_len = hdr.hdr_len + hdr.type_len + hdr.str_len; in libbpf__load_raw_btf() 242 memcpy(raw_btf + hdr.hdr_len + hdr.type_len, str_sec, hdr.str_len); in libbpf__load_raw_btf() 221 libbpf__load_raw_btf(const char *raw_types, size_t types_len, const char *str_sec, size_t str_len) libbpf__load_raw_btf() argument
|