Skip to content

Commit

Permalink
better naming for unix socket function
Browse files Browse the repository at this point in the history
  • Loading branch information
kentslaney committed Jun 6, 2024
1 parent fb03c5d commit 6888e8b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ typedef enum {
} op_code_t;

const char* errCodeToString(err_code_t err);
bool isLocalSocket(const char* host);
bool isUnixSocket(const char* host);
server_string_split_t splitServerString(char* input);

} // namespace mc
Expand Down
4 changes: 2 additions & 2 deletions src/Common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ const char* errCodeToString(err_code_t err) {
}
}

bool isLocalSocket(const char* host) {
bool isUnixSocket(const char* host) {
// errors on the side of false negatives, allowing syntax expansion;
// starting slash to denote socket paths is from pylibmc
// starting slash syntax is from libmemcached
return host[0] == '/';
}

Expand Down
2 changes: 1 addition & 1 deletion src/Connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Connection::~Connection() {
int Connection::init(const char* host, uint32_t port, const char* alias) {
snprintf(m_host, sizeof m_host, "%s", host);
m_port = port;
m_unixSocket = isLocalSocket(m_host);
m_unixSocket = isUnixSocket(m_host);
if (alias == NULL) {
m_hasAlias = false;
if (m_unixSocket) {
Expand Down

0 comments on commit 6888e8b

Please sign in to comment.