/external/llvm-project/clang-tools-extra/test/clang-tidy/checkers/ |
D | readability-string-compare.cpp | 33 std::string str2("b", 1); in Test() local 35 if (str1.compare(str2)) { in Test() 38 if (!str1.compare(str2)) { in Test() 41 if (str1.compare(str2) == 0) { in Test() 45 if (str1.compare(str2) != 0) { in Test() 53 if (0 == str1.compare(str2)) { in Test() 57 if (0 != str1.compare(str2)) { in Test() 61 func(str1.compare(str2)); in Test() 63 if (str2.empty() || str1.compare(str2) != 0) { in Test() 68 if (str3->compare(str2)) { in Test() [all …]
|
D | bugprone-not-null-terminated-result-in-initialization-strlen.c | 39 int bad_strncmp_1(char *str1, const char *str2) { in bad_strncmp_1() argument 41 return strncmp(str1, str2, length); in bad_strncmp_1() 46 int good_strncmp_1(char *str1, const char *str2) { in good_strncmp_1() argument 48 return strncmp(str1, str2, length - 1); in good_strncmp_1() 51 int bad_strncmp_2(char *str2) { in bad_strncmp_2() argument 52 return strncmp(str2, "foobar", (strlen("foobar") + 1)); in bad_strncmp_2()
|
/external/libabigail/src/ |
D | abg-diff-utils.cc | 97 compute_middle_snake(const char* str1, const char* str2, in compute_middle_snake() argument 101 int str1_size = strlen(str1), str2_size = strlen(str2); in compute_middle_snake() 105 str2 , str2 + str2_size, in compute_middle_snake() 129 const char* str2, in ses_len() argument 132 int str1_size = strlen(str1), str2_size = strlen(str2); in ses_len() 136 str2, str2 + str2_size, in ses_len() 157 compute_lcs(const char* str1, const char* str2, int &ses_len, string& lcs) in compute_lcs() argument 163 str2, str2 + strlen(str2), in compute_lcs() 171 ABG_ASSERT(str1[x] == str2[y]); in compute_lcs() 187 compute_ses(const char* str1, const char* str2, edit_script& ses) in compute_ses() argument [all …]
|
/external/pcre/dist2/src/ |
D | pcre2_string_utils.c | 102 PRIV(strcmp)(PCRE2_SPTR str1, PCRE2_SPTR str2) in PRIV() 105 while (*str1 != '\0' || *str2 != '\0') in PRIV() 108 c2 = *str2++; in PRIV() 130 PRIV(strcmp_c8)(PCRE2_SPTR str1, const char *str2) in PRIV() 133 while (*str1 != '\0' || *str2 != '\0') in PRIV() 136 c2 = *str2++; in PRIV() 157 PRIV(strncmp)(PCRE2_SPTR str1, PCRE2_SPTR str2, size_t len) in PRIV() 163 c2 = *str2++; in PRIV() 186 PRIV(strncmp_c8)(PCRE2_SPTR str1, const char *str2, size_t len) in PRIV() 192 c2 = *str2++; in PRIV() [all …]
|
/external/libxml2/ |
D | xmlstring.c | 132 xmlStrcmp(const xmlChar *str1, const xmlChar *str2) { in xmlStrcmp() argument 133 if (str1 == str2) return(0); in xmlStrcmp() 135 if (str2 == NULL) return(1); in xmlStrcmp() 137 return(strcmp((const char *)str1, (const char *)str2)); in xmlStrcmp() 140 int tmp = *str1++ - *str2; in xmlStrcmp() 142 } while (*str2++ != 0); in xmlStrcmp() 159 xmlStrEqual(const xmlChar *str1, const xmlChar *str2) { in xmlStrEqual() argument 160 if (str1 == str2) return(1); in xmlStrEqual() 162 if (str2 == NULL) return(0); in xmlStrEqual() 164 return(strcmp((const char *)str1, (const char *)str2) == 0); in xmlStrEqual() [all …]
|
/external/dagger2/javatests/dagger/functional/assisted/ |
D | AssistedFactoryWithQualifiedTypesTest.java | 49 private final String str2; field in AssistedFactoryWithQualifiedTypesTest.DupeType 52 DupeType(@Assisted("1") String str1, @Assisted("2") String str2) { in DupeType() argument 54 this.str2 = str2; in DupeType() 60 DupeType create(@Assisted("1") String str1, @Assisted("2") String str2); in create() argument 66 String str2 = "str2"; in testDupeTypeFactory() local 70 .create(str1, str2); in testDupeTypeFactory() 72 assertThat(dupeType.str2).isEqualTo(str2); in testDupeTypeFactory() 77 DupeType create(@Assisted("2") String str2, @Assisted("1") String str1); in create() argument 83 String str2 = "str2"; in testSwappedDupeTypeFactory() local 87 .create(str2, str1); in testSwappedDupeTypeFactory() [all …]
|
/external/mesa3d/src/util/tests/hash_table/ |
D | collision.c | 40 const char *str2 = "test2"; in main() local 55 _mesa_hash_table_insert_pre_hashed(ht, bad_hash, str2, NULL); in main() 61 entry2 = _mesa_hash_table_search_pre_hashed(ht, bad_hash, str2); in main() 62 assert(entry2->key == str2); in main() 70 entry2 = _mesa_hash_table_search_pre_hashed(ht, bad_hash, str2); in main() 71 assert(entry2->key == str2); in main() 74 _mesa_hash_table_insert_pre_hashed(ht, bad_hash, str2, NULL); in main() 75 entry2 = _mesa_hash_table_search_pre_hashed(ht, bad_hash, str2); in main() 77 assert(search_entry == entry2 || search_entry->key != str2); in main() 91 entry2 = _mesa_hash_table_search_pre_hashed(ht, bad_hash, str2); in main() [all …]
|
D | replacement.c | 40 char *str2 = strdup("test1"); in main() local 46 assert(str1 != str2); in main() 52 _mesa_hash_table_insert(ht, str2, str2); in main() 56 assert(entry->data == str2); in main() 65 free(str2); in main()
|
D | remove_key.c | 37 const char *str2 = "test2"; in main() local 46 _mesa_hash_table_insert(ht, str2, NULL); in main() 48 entry = _mesa_hash_table_search(ht, str2); in main() 49 assert(strcmp(entry->key, str2) == 0); in main() 59 entry = _mesa_hash_table_search(ht, str2); in main() 60 assert(strcmp(entry->key, str2) == 0); in main()
|
D | delete_and_lookup.c | 50 const char *str2 = "test2"; in main() local 59 _mesa_hash_table_insert(ht, str2, NULL); in main() 61 entry = _mesa_hash_table_search(ht, str2); in main() 62 assert(strcmp(entry->key, str2) == 0); in main() 72 entry = _mesa_hash_table_search(ht, str2); in main() 73 assert(strcmp(entry->key, str2) == 0); in main()
|
/external/llvm-project/clang-tools-extra/docs/clang-tidy/checks/ |
D | readability-string-compare.rst | 22 std::string str2{"b"}; 24 // use str1 != str2 instead. 25 if (str1.compare(str2)) { 28 // use str1 == str2 instead. 29 if (!str1.compare(str2)) { 32 // use str1 == str2 instead. 33 if (str1.compare(str2) == 0) { 36 // use str1 != str2 instead. 37 if (str1.compare(str2) != 0) { 40 // use str1 == str2 instead. [all …]
|
/external/ms-tpm-20-ref/Samples/ARM32-FirmwareTPM/optee_ta/fTPM/reference/include/ |
D | RuntimeSupport.h | 60 #define XSTRNCPY(str1,str2,n) strncpy((str1),(str2),(n)) argument 64 int strncasecmp(const char *str1, const char *str2, size_t n); 65 #define XSTRNCASECMP(str1,str2,n) strncasecmp((str1),(str2),(n)) argument 69 #define XSTRNCMP(str1,str2,n) strncmp((str1),(str2),(n)) argument 73 #define XMEMCMP(str1,str2,n) memcmp((str1),(str2),(n)) argument
|
/external/pdfium/core/fxcrt/ |
D | bytestring.h | 60 ByteString(ByteStringView str1, ByteStringView str2); 236 inline ByteString operator+(ByteStringView str1, ByteStringView str2) { 237 return ByteString(str1, str2); 239 inline ByteString operator+(ByteStringView str1, const char* str2) { 240 return ByteString(str1, str2); 242 inline ByteString operator+(const char* str1, ByteStringView str2) { 243 return ByteString(str1, str2); 248 inline ByteString operator+(char ch, ByteStringView str2) { 249 return ByteString(ch, str2); 251 inline ByteString operator+(const ByteString& str1, const ByteString& str2) { [all …]
|
D | widestring.h | 58 WideString(WideStringView str1, WideStringView str2); 237 inline WideString operator+(WideStringView str1, WideStringView str2) { 238 return WideString(str1, str2); 240 inline WideString operator+(WideStringView str1, const wchar_t* str2) { 241 return WideString(str1, str2); 243 inline WideString operator+(const wchar_t* str1, WideStringView str2) { 244 return WideString(str1, str2); 249 inline WideString operator+(wchar_t ch, WideStringView str2) { 250 return WideString(ch, str2); 252 inline WideString operator+(const WideString& str1, const WideString& str2) { [all …]
|
/external/llvm-project/llvm/test/Transforms/InstCombine/ |
D | strncmp-1.ll | 15 define i32 @test1(i8* %str2) { 24 %temp1 = call i32 @strncmp(i8* %str1, i8* %str2, i32 10) 36 %str2 = getelementptr inbounds [1 x i8], [1 x i8]* @null, i32 0, i32 0 37 %temp1 = call i32 @strncmp(i8* %str1, i8* %str2, i32 10) 48 %str2 = getelementptr inbounds [6 x i8], [6 x i8]* @hello, i32 0, i32 0 49 %temp1 = call i32 @strncmp(i8* %str1, i8* %str2, i32 10) 59 %str2 = getelementptr inbounds [1 x i8], [1 x i8]* @null, i32 0, i32 0 60 %temp1 = call i32 @strncmp(i8* %str1, i8* %str2, i32 10) 70 %str2 = getelementptr inbounds [6 x i8], [6 x i8]* @hello, i32 0, i32 0 71 %temp1 = call i32 @strncmp(i8* %str1, i8* %str2, i32 4) [all …]
|
/external/one-true-awk/bugs-fixed/ |
D | subsep-overflow.awk | 11 str2 = foo("b", 9000); 13 a[(SUBSEP = str1), (SUBSEP = str2), "c"] = 1; 19 print (((SUBSEP = str1), (SUBSEP = str2), "c") in a); 20 print (((SUBSEP = str1) SUBSEP (SUBSEP = str2) SUBSEP "c") in a); 21 delete a[(SUBSEP = str1), (SUBSEP = str2), "c"]; 22 print (((SUBSEP = str1), (SUBSEP = str2), "c") in a); 23 print (((SUBSEP = str1) SUBSEP (SUBSEP = str2) SUBSEP "c") in a);
|
/external/libabigail/tests/ |
D | test-diff2.cc | 43 const char* str2; member 53 str2(0) in options() 84 else if (!opts.str2) in parse_command_line() 85 opts.str2 = argv[i]; in parse_command_line() 121 int len = ses_len(opts.str1, opts.str2, opts.reverse); in main() 130 if (compute_middle_snake(opts.str1, opts.str2, in main() 133 print_snake(opts.str1, opts.str2, s, cout); in main() 143 compute_lcs(opts.str1, opts.str2, ses_len, lcs); in main() 152 compute_ses(opts.str1, opts.str2, ses); in main() 153 display_edit_script(ses, opts.str1, opts.str2, cout); in main()
|
/external/llvm/test/Transforms/InstCombine/ |
D | strncmp-1.ll | 14 define i32 @test1(i8* %str2) { 22 %temp1 = call i32 @strncmp(i8* %str1, i8* %str2, i32 10) 33 %str2 = getelementptr inbounds [1 x i8], [1 x i8]* @null, i32 0, i32 0 34 %temp1 = call i32 @strncmp(i8* %str1, i8* %str2, i32 10) 44 %str2 = getelementptr inbounds [6 x i8], [6 x i8]* @hello, i32 0, i32 0 45 %temp1 = call i32 @strncmp(i8* %str1, i8* %str2, i32 10) 54 %str2 = getelementptr inbounds [1 x i8], [1 x i8]* @null, i32 0, i32 0 55 %temp1 = call i32 @strncmp(i8* %str1, i8* %str2, i32 10) 64 %str2 = getelementptr inbounds [6 x i8], [6 x i8]* @hello, i32 0, i32 0 65 %temp1 = call i32 @strncmp(i8* %str1, i8* %str2, i32 4) [all …]
|
D | strcmp-1.ll | 14 define i32 @test1(i8* %str2) { 22 %temp1 = call i32 @strcmp(i8* %str1, i8* %str2) 34 %str2 = getelementptr inbounds [1 x i8], [1 x i8]* @null, i32 0, i32 0 35 %temp1 = call i32 @strcmp(i8* %str1, i8* %str2) 45 %str2 = getelementptr inbounds [6 x i8], [6 x i8]* @hello, i32 0, i32 0 46 %temp1 = call i32 @strcmp(i8* %str1, i8* %str2) 55 %str2 = getelementptr inbounds [1 x i8], [1 x i8]* @null, i32 0, i32 0 56 %temp1 = call i32 @strcmp(i8* %str1, i8* %str2) 64 …32 @memcmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @hello, i32 0, i32 0), i8* %str2, i32 5) 70 %str2 = select i1 %b, i8* %temp1, i8* %temp2 [all …]
|
/external/llvm-project/llvm/test/Transforms/InstCombine/ARM/ |
D | strcmp.ll | 15 define arm_aapcscc i32 @test1(i8* %str2) { 24 %temp1 = call arm_apcscc i32 @strcmp(i8* %str1, i8* %str2) 37 %str2 = getelementptr inbounds [1 x i8], [1 x i8]* @null, i32 0, i32 0 38 %temp1 = call arm_aapcscc i32 @strcmp(i8* %str1, i8* %str2) 49 %str2 = getelementptr inbounds [6 x i8], [6 x i8]* @hello, i32 0, i32 0 50 %temp1 = call arm_aapcscc i32 @strcmp(i8* %str1, i8* %str2) 60 %str2 = getelementptr inbounds [1 x i8], [1 x i8]* @null, i32 0, i32 0 61 %temp1 = call arm_aapcscc i32 @strcmp(i8* %str1, i8* %str2) 77 %str2 = select i1 %b, i8* %temp1, i8* %temp2 78 %temp3 = call arm_aapcscc i32 @strcmp(i8* %str1, i8* %str2) [all …]
|
/external/icu/icu4c/source/common/ |
D | cstring.cpp | 235 uprv_stricmp(const char *str1, const char *str2) { in uprv_stricmp() argument 237 if(str2==NULL) { in uprv_stricmp() 242 } else if(str2==NULL) { in uprv_stricmp() 251 c2=(unsigned char)*str2; in uprv_stricmp() 268 ++str2; in uprv_stricmp() 274 uprv_strnicmp(const char *str1, const char *str2, uint32_t n) { in uprv_strnicmp() argument 276 if(str2==NULL) { in uprv_strnicmp() 281 } else if(str2==NULL) { in uprv_strnicmp() 290 c2=(unsigned char)*str2; in uprv_strnicmp() 307 ++str2; in uprv_strnicmp()
|
/external/clang/test/Sema/ |
D | overloaded-func-transparent-union.c | 8 char *str2; member 15 __attribute__((overloadable)) void Class_Init(Instance this, char *str, void *str2) { in Class_Init() argument 17 this.object->str2 = str2; in Class_Init() 22 this.object->str2 = str; in Class_Init()
|
/external/llvm-project/clang/test/Sema/ |
D | overloaded-func-transparent-union.c | 8 char *str2; member 15 __attribute__((overloadable)) void Class_Init(Instance this, char *str, void *str2) { in Class_Init() argument 17 this.object->str2 = str2; in Class_Init() 22 this.object->str2 = str; in Class_Init()
|
/external/ltp/testcases/kernel/syscalls/memmap/ |
D | mem03.c | 76 char str2[] = "my test mem"; in main() local 87 write(f2, str2, strlen(str2)); in main() 104 if (strncmp(str2, mm2, strlen(str2))) in main() 129 if (strncmp(str2, mm2, strlen(str2))) in main()
|
/external/llvm/test/MC/ELF/ |
D | entsize.s | 13 .type .L.str2,@object # @.str2 14 .L.str2: 16 .size .L.str2, 7 19 .section .rodata.str2.1,"aMS",@progbits,2
|