| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 5f8aef4 commit 274c0f2
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -841,8 +841,7 @@ void SecureContext::SetECDHCurve(const FunctionCallbackInfo<Value>& args) { | |||
| 841 | 841 | ||
| 842 | 842 | Utf8Value curve(env->isolate(), args[0]); | |
| 843 | 843 | ||
| 844 | - if (strcmp(*curve, "auto") != 0 && | ||
| 845 | - !SSL_CTX_set1_curves_list(sc->ctx_.get(), *curve)) { | ||
| 844 | + if (curve != "auto" && !SSL_CTX_set1_curves_list(sc->ctx_.get(), *curve)) { | ||
| 846 | 845 | return THROW_ERR_CRYPTO_OPERATION_FAILED(env, "Failed to set ECDH curve"); | |
| 847 | 846 | } | |
| 848 | 847 | } | |
| 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 | |
|---|---|---|---|
@@ -525,9 +525,8 @@ class Utf8Value : public MaybeStackBuffer<char> { | |||
| 525 | 525 | public: | |
| 526 | 526 | explicit Utf8Value(v8::Isolate* isolate, v8::Local<v8::Value> value); | |
| 527 | 527 | ||
| 528 | - inline bool operator==(const char* a) const { | ||
| 529 | - return strcmp(out(), a) == 0; | ||
| 530 | - } | ||
| 528 | + inline bool operator==(const char* a) const { return strcmp(out(), a) == 0; } | ||
| 529 | + inline bool operator!=(const char* a) const { return !(*this == a); } | ||
| 531 | 530 | }; | |
| 532 | 531 | ||
| 533 | 532 | class TwoByteValue : public MaybeStackBuffer<uint16_t> { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments