| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1625ae1 commit 4bc17fd
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -840,8 +840,7 @@ void SecureContext::SetECDHCurve(const FunctionCallbackInfo<Value>& args) { | |||
| 840 | 840 | ||
| 841 | 841 | Utf8Value curve(env->isolate(), args[0]); | |
| 842 | 842 | ||
| 843 | - if (strcmp(*curve, "auto") != 0 && | ||
| 844 | - !SSL_CTX_set1_curves_list(sc->ctx_.get(), *curve)) { | ||
| 843 | + if (curve != "auto" && !SSL_CTX_set1_curves_list(sc->ctx_.get(), *curve)) { | ||
| 845 | 844 | return THROW_ERR_CRYPTO_OPERATION_FAILED(env, "Failed to set ECDH curve"); | |
| 846 | 845 | } | |
| 847 | 846 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1350,8 +1350,7 @@ unsigned int TLSWrap::PskServerCallback( | |||
| 1350 | 1350 | ||
| 1351 | 1351 | // Make sure there are no utf8 replacement symbols. | |
| 1352 | 1352 | Utf8Value identity_utf8(env->isolate(), identity_str); | |
| 1353 | - if (strcmp(*identity_utf8, identity) != 0) | ||
| 1354 | - return 0; | ||
| 1353 | + if (identity_utf8 != identity) return 0; | ||
| 1355 | 1354 | ||
| 1356 | 1355 | Local<Value> argv[] = { | |
| 1357 | 1356 | identity_str, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -401,7 +401,7 @@ static void PrintJavaScriptErrorProperties(JSONWriter* writer, | |||
| 401 | 401 | continue; | |
| 402 | 402 | } | |
| 403 | 403 | node::Utf8Value k(isolate, key); | |
| 404 | - if (!strcmp(*k, "stack") || !strcmp(*k, "message")) continue; | ||
| 404 | + if (k == "stack" || k == "message") continue; | ||
| 405 | 405 | node::Utf8Value v(isolate, value_string); | |
| 406 | 406 | writer->json_keyvalue(k.ToStringView(), v.ToStringView()); | |
| 407 | 407 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -531,9 +531,8 @@ class Utf8Value : public MaybeStackBuffer<char> { | |||
| 531 | 531 | return std::string_view(out(), length()); | |
| 532 | 532 | } | |
| 533 | 533 | ||
| 534 | - inline bool operator==(const char* a) const { | ||
| 535 | - return strcmp(out(), a) == 0; | ||
| 536 | - } | ||
| 534 | + inline bool operator==(const char* a) const { return strcmp(out(), a) == 0; } | ||
| 535 | + inline bool operator!=(const char* a) const { return !(*this == a); } | ||
| 537 | 536 | }; | |
| 538 | 537 | ||
| 539 | 538 | class TwoByteValue : public MaybeStackBuffer<uint16_t> { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments