Remove weird, seemingly pointless variable

pull/23203/head
Richard Belleville 5 years ago
parent f2a0f47fbb
commit fd33b5575f
  1. 6
      src/core/lib/security/credentials/google_default/google_default_credentials.cc

@ -30,7 +30,6 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gpr/env.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gprpp/atomic.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/http/httpcli.h"
#include "src/core/lib/http/parser.h"
@ -58,7 +57,6 @@ using grpc_core::Json;
* means the detection is done via network test that is unreliable and the
* unreliable result should not be referred by successive calls. */
static int g_metadata_server_available = 0;
static grpc_core::Atomic<bool> g_is_on_gce(false);
static gpr_mu g_state_mu;
/* Protect a metadata_server_detector instance that can be modified by more than
* one gRPC threads */
@ -366,9 +364,7 @@ void grpc_flush_cached_google_default_credentials(void) {
}
bool is_on_gce(void) {
bool on_gce = g_gce_tenancy_checker();
g_is_on_gce.Store(on_gce, grpc_core::MemoryOrder::RELEASE);
return on_gce;
return g_gce_tenancy_checker();
}
} // namespace internal

Loading…
Cancel
Save