Skip to content

Commit

Permalink
naive: Replace arraysize with base::size
Browse files Browse the repository at this point in the history
  • Loading branch information
klzgrad committed Mar 23, 2019
1 parent 090ef75 commit 0f66be5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/net/tools/naive/socks5_server_socket.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "base/bind_helpers.h"
#include "base/callback_helpers.h"
#include "base/logging.h"
#include "base/stl_util.h"
#include "base/sys_byteorder.h"
#include "net/base/ip_address.h"
#include "net/base/net_errors.h"
Expand Down Expand Up @@ -340,7 +341,7 @@ int Socks5ServerSocket::DoGreetReadComplete(int result) {
int Socks5ServerSocket::DoGreetWrite() {
if (buffer_.empty()) {
const char write_data[] = {kSOCKS5Version, auth_method_};
buffer_ = std::string(write_data, arraysize(write_data));
buffer_ = std::string(write_data, base::size(write_data));
bytes_sent_ = 0;
}

Expand Down Expand Up @@ -498,7 +499,7 @@ int Socks5ServerSocket::DoHandshakeWrite() {
0x00,
0x00, // BND.PORT
};
buffer_ = std::string(write_data, arraysize(write_data));
buffer_ = std::string(write_data, base::size(write_data));
bytes_sent_ = 0;
}

Expand Down

0 comments on commit 0f66be5

Please sign in to comment.