/external/llvm/test/Transforms/InstCombine/ |
D | strncpy-1.ll | 1 ; Test that the strncpy library call simplifier works correctly. 13 declare i8* @strncpy(i8*, i8*, i32) 16 ; Check a bunch of strncpy invocations together. 20 ; CHECK-NOT: call i8* @strncpy 27 %rslt1 = call i8* @strncpy(i8* %arg1, i8* %arg2, i32 6) 30 %rslt2 = call i8* @strncpy(i8* %rslt1, i8* %arg3, i32 42) 33 %rslt3 = call i8* @strncpy(i8* %rslt2, i8* %arg4, i32 42) 39 ; Check strncpy(x, "", y) -> memset(x, '\0', y, 1). 46 call i8* @strncpy(i8* %dst, i8* %src, i32 32) 51 ; Check strncpy(x, y, 0) -> x. [all …]
|
D | strncpy-2.ll | 1 ; Test that the strncpy library call simplifier works correctly. 10 declare i16* @strncpy(i8*, i8*, i32) 12 ; Check that 'strncpy' functions with the wrong prototype aren't simplified. 19 call i16* @strncpy(i8* %dst, i8* %src, i32 6) 20 ; CHECK: call i16* @strncpy
|
/external/python/cpython2/Modules/ |
D | getpath.c | 207 strncpy(buffer+n, stuff, k); in joinpath() 254 strncpy(prefix, home, MAXPATHLEN); in search_for_prefix() 290 strncpy(prefix, PREFIX, MAXPATHLEN); in search_for_prefix() 314 strncpy(exec_prefix, delim+1, MAXPATHLEN); in search_for_exec_prefix() 316 strncpy(exec_prefix, home, MAXPATHLEN); in search_for_exec_prefix() 356 strncpy(exec_prefix, EXEC_PREFIX, MAXPATHLEN); in search_for_exec_prefix() 403 strncpy(progpath, prog, MAXPATHLEN); in calculate_path() 426 strncpy(progpath, path, len); in calculate_path() 430 strncpy(progpath, path, MAXPATHLEN); in calculate_path() 447 strncpy(argv0_path, progpath, MAXPATHLEN); in calculate_path() [all …]
|
/external/llvm-project/llvm/test/Transforms/InstCombine/ |
D | strncpy-1.ll | 2 ; Test that the strncpy library call simplifier works correctly. 14 declare i8* @strncpy(i8*, i8*, i32) 17 ; Check a bunch of strncpy invocations together. 35 %rslt1 = call i8* @strncpy(i8* %arg1, i8* %arg2, i32 6) 38 %rslt2 = call i8* @strncpy(i8* %rslt1, i8* %arg3, i32 42) 41 %rslt3 = call i8* @strncpy(i8* %rslt2, i8* %arg4, i32 42) 47 ; Check strncpy(x, "", y) -> memset(x, '\0', y, 1). 57 call i8* @strncpy(i8* %dst, i8* %src, i32 32) 61 ; Check strncpy(x, y, 0) -> x. 70 %ret = call i8* @strncpy(i8* %dst, i8* %src, i32 0) [all …]
|
D | strncpy-2.ll | 2 ; Test that the strncpy library call simplifier works correctly. 11 declare i16* @strncpy(i8*, i8*, i32) 13 ; Check that 'strncpy' functions with the wrong prototype aren't simplified. 17 ; CHECK-NEXT: [[TMP1:%.*]] = call i16* @strncpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]… 23 call i16* @strncpy(i8* %dst, i8* %src, i32 6)
|
D | strncpy-3.ll | 9 declare i8* @strncpy(i8*, i8*, i64) 18 …tail call i8* @strncpy(i8* %dst, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 … 28 …tail call i8* @strncpy(i8* %dst, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str2, i64 0, i64… 38 …tail call i8* @strncpy(i8* %dst, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str3, i64 0, i64… 47 …tail call i8* @strncpy(i8* %dst, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str3, i64 0, i64… 53 ; CHECK-NEXT: [[TMP1:%.*]] = tail call i8* @strncpy(i8* nonnull dereferenceable(1) [[DST:%.*]], … 56 …tail call i8* @strncpy(i8* %dst, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str3, i64 0, i64…
|
/external/cpuinfo/test/name/ |
D | android-properties-interface.c | 20 strncpy(properties.proc_cpuinfo_hardware, proc_cpuinfo_hardware, CPUINFO_HARDWARE_VALUE_MAX); in cpuinfo_arm_android_parse_chipset_properties() 21 strncpy(properties.ro_product_board, ro_product_board, CPUINFO_BUILD_PROP_VALUE_MAX); in cpuinfo_arm_android_parse_chipset_properties() 22 strncpy(properties.ro_board_platform, ro_board_platform, CPUINFO_BUILD_PROP_VALUE_MAX); in cpuinfo_arm_android_parse_chipset_properties() 23 strncpy(properties.ro_mediatek_platform, ro_mediatek_platform, CPUINFO_BUILD_PROP_VALUE_MAX); in cpuinfo_arm_android_parse_chipset_properties() 24 strncpy(properties.ro_arch, ro_arch, CPUINFO_BUILD_PROP_VALUE_MAX); in cpuinfo_arm_android_parse_chipset_properties() 25 strncpy(properties.ro_chipname, ro_chipname, CPUINFO_BUILD_PROP_VALUE_MAX); in cpuinfo_arm_android_parse_chipset_properties()
|
/external/compiler-rt/lib/asan/tests/ |
D | asan_str_test.cc | 180 strncpy(to, from, 0); in TEST() 181 strncpy(to - 1, from - 1, 0); in TEST() 183 strncpy(to, from, from_size); in TEST() 184 strncpy(to, from, to_size); in TEST() 185 strncpy(to, from + from_size - 1, to_size); in TEST() 186 strncpy(to + to_size - 1, from, 1); in TEST() 188 EXPECT_DEATH(Ident(strncpy(to, from - 1, from_size)), in TEST() 190 EXPECT_DEATH(Ident(strncpy(to - 1, from, from_size)), in TEST() 192 EXPECT_DEATH(Ident(strncpy(to, from + from_size, 1)), in TEST() 194 EXPECT_DEATH(Ident(strncpy(to + to_size, from, 1)), in TEST() [all …]
|
/external/llvm-project/compiler-rt/lib/asan/tests/ |
D | asan_str_test.cpp | 218 strncpy(to, from, 0); in TEST() 219 strncpy(to - 1, from - 1, 0); in TEST() 221 strncpy(to, from, from_size); in TEST() 222 strncpy(to, from, to_size); in TEST() 223 strncpy(to, from + from_size - 1, to_size); in TEST() 224 strncpy(to + to_size - 1, from, 1); in TEST() 226 EXPECT_DEATH(Ident(strncpy(to, from - 1, from_size)), in TEST() 228 EXPECT_DEATH(Ident(strncpy(to - 1, from, from_size)), in TEST() 230 EXPECT_DEATH(Ident(strncpy(to, from + from_size, 1)), in TEST() 232 EXPECT_DEATH(Ident(strncpy(to + to_size, from, 1)), in TEST() [all …]
|
/external/iproute2/ip/ |
D | tunnel.c | 77 strncpy(ifr.ifr_name, basedev, IFNAMSIZ); in tnl_get_ioctl() 102 strncpy(ifr.ifr_name, name, IFNAMSIZ); in tnl_add_ioctl() 104 strncpy(ifr.ifr_name, basedev, IFNAMSIZ); in tnl_add_ioctl() 128 strncpy(ifr.ifr_name, name, IFNAMSIZ); in tnl_del_ioctl() 130 strncpy(ifr.ifr_name, basedev, IFNAMSIZ); in tnl_del_ioctl() 155 strncpy(ifr.ifr_name, name, IFNAMSIZ); in tnl_gen_ioctl()
|
/external/python/cpython2/PC/os2emx/ |
D | getpathp.c | 161 strncpy(buffer+n, stuff, k); in join() 223 strncpy(progpath, prog, MAXPATHLEN); in get_progpath() 236 strncpy(progpath, path, len); in get_progpath() 240 strncpy(progpath, path, MAXPATHLEN); in get_progpath() 280 strncpy(prefix, pythonhome, MAXPATHLEN); in calculate_path() 286 strncpy(zip_path, progpath, MAXPATHLEN); in calculate_path() 371 strncpy(buf, p, n); in calculate_path()
|
/external/nanopb-c/tests/map/ |
D | encode_map.c | 17 strncpy(msg.numbers[0].key, "one", sizeof(msg.numbers[0].key)); in main() 18 strncpy(msg.numbers[1].key, "two", sizeof(msg.numbers[1].key)); in main() 19 strncpy(msg.numbers[2].key, "seven", sizeof(msg.numbers[2].key)); in main()
|
/external/llvm-project/llvm/test/Transforms/DeadStoreElimination/MemDepAnalysis/ |
D | libcalls2.ll | 5 declare i8* @strncpy(i8* %dest, i8* %src, i32 %n) nounwind 10 ; CHECK: @strncpy 11 %call = call i8* @strncpy(i8* %dest, i8* %src, i32 12)
|
/external/clang/test/Analysis/ |
D | string.c | 451 #define strncpy(a,b,n) __strncpy_chk(a,b,n,(size_t)-1) macro 455 #define strncpy BUILTIN(strncpy) macro 456 char *strncpy(char *restrict s1, const char *restrict s2, size_t n); 462 strncpy(NULL, x, 5); // expected-warning{{Null pointer argument in call to string copy function}} in strncpy_null_dst() 466 strncpy(x, NULL, 5); // expected-warning{{Null pointer argument in call to string copy function}} in strncpy_null_src() 470 …strncpy(x, (char*)&strcpy_fn, 5); // expected-warning{{Argument to string copy function is the add… in strncpy_fn() 476 clang_analyzer_eval(strncpy(x, y, 5) == x); // expected-warning{{TRUE}} in strncpy_effects() 484 …strncpy(x, y, 5); // expected-warning{{Size argument is greater than the length of the destination… in strncpy_overflow() 490 …strncpy(x, y, 5); // expected-warning{{Size argument is greater than the length of the destination… in strncpy_no_overflow() 499 …strncpy(x, y, n); // expected-warning{{Size argument is greater than the length of the destination… in strncpy_no_overflow2() [all …]
|
/external/mtools/ |
D | expand.c | 80 strncpy(ans, input, EXPAND_BUF-1); in expand() 99 strncpy(ans, input, EXPAND_BUF-1); in expand() 102 strncpy(ans, input, EXPAND_BUF-1); in expand()
|
/external/ipsec-tools/src/racoon/ |
D | var.h | 82 strncpy((y), "(invalid)", sizeof(y)); \ 84 strncpy((z), "(invalid)", sizeof(z)); \ 93 strncpy((y), "(invalid)", sizeof(y)); \
|
/external/python/cpython2/PC/ |
D | getpathp.c | 167 strncpy(buffer+n, stuff, k); in join() 431 strncpy(progpath, prog, MAXPATHLEN); in get_progpath() 440 strncpy(progpath, path, len); in get_progpath() 444 strncpy(progpath, path, MAXPATHLEN); in get_progpath() 490 strncpy(prefix, pythonhome, MAXPATHLEN); in calculate_path() 499 strncpy(zip_path, dllpath, MAXPATHLEN); in calculate_path() 501 strncpy(zip_path, progpath, MAXPATHLEN); in calculate_path() 633 strncpy(buf, p, n); in calculate_path() 668 strncpy(lookBuf, look+1, nchars); in calculate_path()
|
/external/mesa3d/src/gallium/targets/d3dadapter9/ |
D | description.c | 252 strncpy(drvid->Driver, "igdumd32.dll", sizeof(drvid->Driver)); in d3d_fill_driver_version() 257 strncpy(drvid->Driver, "vm3dum.dll", sizeof(drvid->Driver)); in d3d_fill_driver_version() 262 strncpy(drvid->Driver, "atiumdag.dll", sizeof(drvid->Driver)); in d3d_fill_driver_version() 267 strncpy(drvid->Driver, "nvd3dum.dll", sizeof(drvid->Driver)); in d3d_fill_driver_version()
|
/external/curl/lib/ |
D | strerror.c | 642 strncpy(buf, p, len); in get_winsock_error() 733 strncpy(buf, strerror(err), max); in Curl_strerror() 766 strncpy(buf, msg, max); in Curl_strerror() 778 strncpy(buf, buffer, max); in Curl_strerror() 786 strncpy(buf, msg, max); in Curl_strerror() 839 strncpy(buf, txt, buflen); in Curl_winapi_strerror() 981 strncpy(buf, txtbuf, buflen); in Curl_sspi_strerror() 991 strncpy(buf, txt, buflen); in Curl_sspi_strerror()
|
/external/llvm-project/clang/test/Analysis/ |
D | cstring-plist.c | 13 char *strncpy(char *restrict s1, const char *restrict s2, size_t n); 19 strncpy(p, "AAA", sizeof("AAA")); // we don't expect warning as the checker is disabled in cstringchecker_bounds_nocrash()
|
D | string.c | 515 #define strncpy(a,b,n) __strncpy_chk(a,b,n,(size_t)-1) macro 519 #define strncpy BUILTIN(strncpy) macro 520 char *strncpy(char *restrict s1, const char *restrict s2, size_t n); 526 …strncpy(NULL, x, 5); // expected-warning{{Null pointer passed as 1st argument to string copy funct… in strncpy_null_dst() 530 …strncpy(x, NULL, 5); // expected-warning{{Null pointer passed as 2nd argument to string copy funct… in strncpy_null_src() 534 …strncpy(x, (char*)&strcpy_fn, 5); // expected-warning{{Argument to string copy function is the add… in strncpy_fn() 540 clang_analyzer_eval(strncpy(x, y, 5) == x); // expected-warning{{TRUE}} in strncpy_effects() 550 strncpy(p, "AAA", sizeof("AAA")); in cstringchecker_bounds_nocrash() 558 strncpy(x, y, 5); in strncpy_overflow() 568 strncpy(x, y, 5); in strncpy_no_overflow() [all …]
|
/external/mdnsresponder/mDNSWindows/ |
D | loclibrary.c | 70 strncpy(isoLangCode, langStr, codeLen); in _getISOCode() 92 strncpy(isoLangCode, DEFAULT_LANG_CODE, LANG_CODE_LEN+1); in _setLanguageIfNeeded() 205 strncpy(locFile, tmpBuffer, locFileLen); in PathForResourceWithPathA() 217 strncpy(locFile, tmpBuffer, locFileLen); in PathForResourceWithPathA()
|
/external/ltp/testcases/kernel/device-drivers/v4l/user_space/ |
D | test_VIDIOC_QUERYCAP.c | 116 strncpy((char *)cap2.driver, (char *)cap.driver, in test_VIDIOC_QUERYCAP() 118 strncpy((char *)cap2.card, (char *)cap.card, sizeof(cap2.card)); in test_VIDIOC_QUERYCAP() 119 strncpy((char *)cap2.bus_info, (char *)cap.bus_info, in test_VIDIOC_QUERYCAP()
|
/external/adhd/cras/src/alsa_plugin/ |
D | ctl_cras.c | 250 strncpy(cras->ext_ctl.id, "cras", sizeof(cras->ext_ctl.id) - 1); in SND_CTL_PLUGIN_DEFINE_FUNC() 252 strncpy(cras->ext_ctl.driver, "CRAS plugin", in SND_CTL_PLUGIN_DEFINE_FUNC() 255 strncpy(cras->ext_ctl.name, "CRAS", sizeof(cras->ext_ctl.name) - 1); in SND_CTL_PLUGIN_DEFINE_FUNC() 257 strncpy(cras->ext_ctl.longname, "CRAS", in SND_CTL_PLUGIN_DEFINE_FUNC() 260 strncpy(cras->ext_ctl.mixername, "CRAS", in SND_CTL_PLUGIN_DEFINE_FUNC()
|
/external/webrtc/modules/audio_device/dummy/ |
D | file_audio_device_factory.cc | 48 strncpy(_inputAudioFilename, inputAudioFilename, MAX_FILENAME_LEN); in SetFilenamesToUse() 49 strncpy(_outputAudioFilename, outputAudioFilename, MAX_FILENAME_LEN); in SetFilenamesToUse()
|