Imported Upstream version 1.33.1
[platform/upstream/grpc.git] / src / core / ext / filters / load_reporting / server_load_reporting_filter.cc
index b3f9928..f2444f6 100644 (file)
@@ -180,7 +180,7 @@ void ServerLoadReportingCallData::StoreClientIpAndLrToken(const char* lr_token,
       gpr_zalloc(client_ip_and_lr_token_len_ * sizeof(char)));
   char* cur_pos = client_ip_and_lr_token_;
   // Store the IP length prefix.
-  if (client_ip.empty()) {
+  if (client_ip.size() == 0) {
     strncpy(cur_pos, kEmptyAddressLengthString, kLengthPrefixSize);
   } else if (client_ip.size() == 8) {
     strncpy(cur_pos, kEncodedIpv4AddressLengthString, kLengthPrefixSize);