Skip to content

Commit

Permalink
INTERNAL: Remove whitespace in libmemcached files
Browse files Browse the repository at this point in the history
  • Loading branch information
ing-eoking committed Jan 24, 2025
1 parent 6804888 commit 7d12456
Show file tree
Hide file tree
Showing 72 changed files with 247 additions and 247 deletions.
2 changes: 1 addition & 1 deletion libmemcached/allocators.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
*
*
* Libmemcached library
*
* Copyright (C) 2011 Data Differential, http://datadifferential.com/
Expand Down
2 changes: 1 addition & 1 deletion libmemcached/analyze.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
*
*
* Libmemcached library
*
* Copyright (C) 2011 Data Differential, http://datadifferential.com/
Expand Down
2 changes: 1 addition & 1 deletion libmemcached/array.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
*
*
* LibMemcached
*
* Copyright (C) 2011 Data Differential, http://datadifferential.com/
Expand Down
2 changes: 1 addition & 1 deletion libmemcached/array.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
*
*
* LibMemcached
*
* Copyright (C) 2011 Data Differential, http://datadifferential.com/
Expand Down
2 changes: 1 addition & 1 deletion libmemcached/assert.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
*
*
* libmcachedd client library.
*
* Copyright (C) 2011 Data Differential, http://datadifferential.com/
Expand Down
2 changes: 1 addition & 1 deletion libmemcached/auto.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
*
*
* Libmemcached library
*
* Copyright (C) 2011 Data Differential, http://datadifferential.com/
Expand Down
6 changes: 3 additions & 3 deletions libmemcached/backtrace.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
*
*
* libmcachedd client library.
*
* Copyright (C) 2011 Data Differential, http://datadifferential.com/
Expand Down Expand Up @@ -59,7 +59,7 @@ void custom_backtrace(void)

fprintf(stderr, "Number of stack frames obtained: %lu\n", (unsigned long)size);

for (size_t x= 1; x < size; x++)
for (size_t x= 1; x < size; x++)
{
size_t sz= 200;
char *function= (char *)malloc(sz);
Expand All @@ -82,7 +82,7 @@ void custom_backtrace(void)

int status;
char *ret = abi::__cxa_demangle(begin, function, &sz, &status);
if (ret)
if (ret)
{
function= ret;
}
Expand Down
2 changes: 1 addition & 1 deletion libmemcached/backtrace.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
*
*
* libmcachedd client library.
*
* Copyright (C) 2011 Data Differential, http://datadifferential.com/
Expand Down
2 changes: 1 addition & 1 deletion libmemcached/basic_string.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
*
*
* Libmemcached library
*
* Copyright (C) 2011 Data Differential, http://datadifferential.com/
Expand Down
2 changes: 1 addition & 1 deletion libmemcached/behavior.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
*
*
* Libmemcached library
*
* Copyright (C) 2011 Data Differential, http://datadifferential.com/
Expand Down
2 changes: 1 addition & 1 deletion libmemcached/byteorder.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
*
*
* Libmemcached library
*
* Copyright (C) 2011 Data Differential, http://datadifferential.com/
Expand Down
2 changes: 1 addition & 1 deletion libmemcached/byteorder.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
*
*
* Libmemcached library
*
* Copyright (C) 2011 Data Differential, http://datadifferential.com/
Expand Down
2 changes: 1 addition & 1 deletion libmemcached/callback.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
*
*
* Libmemcached library
*
* Copyright (C) 2011 Data Differential, http://datadifferential.com/
Expand Down
2 changes: 1 addition & 1 deletion libmemcached/configure.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
*
*
* Libmemcached library
*
* Copyright (C) 2011 Data Differential, http://datadifferential.com/
Expand Down
2 changes: 1 addition & 1 deletion libmemcached/continuum.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
*
*
* LibMemcached
*
* Copyright (C) 2011 Data Differential, http://datadifferential.com/
Expand Down
2 changes: 1 addition & 1 deletion libmemcached/delete.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
*
*
* Libmemcached library
*
* Copyright (C) 2011 Data Differential, http://datadifferential.com/
Expand Down
2 changes: 1 addition & 1 deletion libmemcached/delete.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
*
*
* Libmemcached library
*
* Copyright (C) 2011 Data Differential, http://datadifferential.com/
Expand Down
4 changes: 2 additions & 2 deletions libmemcached/do.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ memcached_return_t memcached_vdo(memcached_server_write_instance_st ptr,
if (memcached_failed(rc= memcached_connect(ptr)))
{
WATCHPOINT_ERROR(rc);
assert_msg(ptr->error_messages,
assert_msg(ptr->error_messages,
"memcached_connect() returned an error but the memcached_server_write_instance_st showed none.");
return rc;
}
Expand All @@ -95,7 +95,7 @@ memcached_return_t memcached_vdo(memcached_server_write_instance_st ptr,
** otherwise we might get a partial write.
**/
if (ptr->type == MEMCACHED_CONNECTION_UDP
&& with_flush
&& with_flush
&& ptr->write_buffer_offset > UDP_DATAGRAM_HEADER_LENGTH)
{
memcached_io_write(ptr, NULL, 0, true);
Expand Down
4 changes: 2 additions & 2 deletions libmemcached/dump.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static memcached_return_t ascii_dump(memcached_st *ptr, memcached_dump_fn *callb

if ((size_t)write_length >= buffer_length || write_length < 0)
{
return memcached_set_error(*ptr, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT,
return memcached_set_error(*ptr, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT,
memcached_literal_param("snprintf(MEMCACHED_DEFAULT_COMMAND_SIZE)"));
}

Expand Down Expand Up @@ -127,7 +127,7 @@ memcached_return_t memcached_dump(memcached_st *ptr, memcached_dump_fn *callback
return rc;
}

/*
/*
No support for Binary protocol yet
@todo Fix this so that we just flush, switch to ascii, and then go back to binary.
*/
Expand Down
2 changes: 1 addition & 1 deletion libmemcached/dump.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
*
*
* Libmemcached library
*
* Copyright (C) 2011 Data Differential, http://datadifferential.com/
Expand Down
30 changes: 15 additions & 15 deletions libmemcached/error.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
*
*
* LibMemcached
*
* Copyright (C) 2011 Data Differential, http://datadifferential.com/
Expand Down Expand Up @@ -152,15 +152,15 @@ static void _set(memcached_st& memc, memcached_string_t *str, memcached_return_t
{
error->size= (int)snprintf(error->message, MAX_ERROR_LENGTH, "%s %s(%s), %.*s -> %s",
errmsg_header,
memcached_strerror(&memc, rc),
memcached_strerror(&memc, rc),
errmsg_ptr,
memcached_string_printf(*str), at);
}
else if (local_errno)
{
error->size= (int)snprintf(error->message, MAX_ERROR_LENGTH, "%s %s(%s) -> %s",
errmsg_header,
memcached_strerror(&memc, rc),
memcached_strerror(&memc, rc),
errmsg_ptr,
at);
}
Expand All @@ -171,45 +171,45 @@ static void _set(memcached_st& memc, memcached_string_t *str, memcached_return_t
}
else if (str and str->size)
{
error->size= (int)snprintf(error->message, MAX_ERROR_LENGTH, "%s %s, %.*s -> %s",
error->size= (int)snprintf(error->message, MAX_ERROR_LENGTH, "%s %s, %.*s -> %s",
errmsg_header,
memcached_strerror(&memc, rc),
memcached_strerror(&memc, rc),
int(str->size), str->c_str, at);
}
else
{
error->size= (int)snprintf(error->message, MAX_ERROR_LENGTH, "%s %s -> %s",
error->size= (int)snprintf(error->message, MAX_ERROR_LENGTH, "%s %s -> %s",
errmsg_header, memcached_strerror(&memc, rc), at);
}
#else
if (str and str->size and local_errno)
{
error->size= (int)snprintf(error->message, MAX_ERROR_LENGTH, "%s(%s), %.*s -> %s",
memcached_strerror(&memc, rc),
error->size= (int)snprintf(error->message, MAX_ERROR_LENGTH, "%s(%s), %.*s -> %s",
memcached_strerror(&memc, rc),
errmsg_ptr,
memcached_string_printf(*str), at);
}
else if (local_errno)
{
error->size= (int)snprintf(error->message, MAX_ERROR_LENGTH, "%s(%s) -> %s",
memcached_strerror(&memc, rc),
error->size= (int)snprintf(error->message, MAX_ERROR_LENGTH, "%s(%s) -> %s",
memcached_strerror(&memc, rc),
errmsg_ptr,
at);
}
else if (rc == MEMCACHED_PARSE_ERROR and str and str->size)
{
error->size= (int)snprintf(error->message, MAX_ERROR_LENGTH, "%.*s -> %s",
error->size= (int)snprintf(error->message, MAX_ERROR_LENGTH, "%.*s -> %s",
int(str->size), str->c_str, at);
}
else if (str and str->size)
{
error->size= (int)snprintf(error->message, MAX_ERROR_LENGTH, "%s, %.*s -> %s",
memcached_strerror(&memc, rc),
error->size= (int)snprintf(error->message, MAX_ERROR_LENGTH, "%s, %.*s -> %s",
memcached_strerror(&memc, rc),
int(str->size), str->c_str, at);
}
else
{
error->size= (int)snprintf(error->message, MAX_ERROR_LENGTH, "%s -> %s",
error->size= (int)snprintf(error->message, MAX_ERROR_LENGTH, "%s -> %s",
memcached_strerror(&memc, rc), at);
}
#endif
Expand Down Expand Up @@ -595,7 +595,7 @@ const char *memcached_last_error_message(memcached_st *memc)

bool memcached_has_current_error(memcached_st &memc)
{
if (memc.error_messages
if (memc.error_messages
and memc.error_messages->query_id == memc.query_id
and memcached_failed(memc.error_messages->rc))
{
Expand Down
2 changes: 1 addition & 1 deletion libmemcached/error.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
*
*
* LibMemcached
*
* Copyright (C) 2011 Data Differential, http://datadifferential.com/
Expand Down
2 changes: 1 addition & 1 deletion libmemcached/error.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
*
*
* LibMemcached
*
* Copyright (C) 2011 Data Differential, http://datadifferential.com/
Expand Down
18 changes: 9 additions & 9 deletions libmemcached/exception.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,27 @@
#include <stdexcept>
#include <string>

namespace memcache
namespace memcache
{
class Exception : public std::runtime_error
{
public:
Exception(const std::string& msg, int in_errno)
:
std::runtime_error(msg),
_errno(in_errno)
:
std::runtime_error(msg),
_errno(in_errno)
{}

Exception(const char *msg, int in_errno)
:
std::runtime_error(std::string(msg)),
:
std::runtime_error(std::string(msg)),
_errno(in_errno) {}

virtual ~Exception() throw() {}

int getErrno() const
{
return _errno;
int getErrno() const
{
return _errno;
}

private:
Expand Down
4 changes: 2 additions & 2 deletions libmemcached/exist.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
*
*
* Libmemcached library
*
* Copyright (C) 2011 Data Differential, http://datadifferential.com/
Expand Down Expand Up @@ -130,7 +130,7 @@ static memcached_return_t binary_exist(memcached_st *memc,
request.message.body.flags= 0;
request.message.body.expiration= htonl(2678400);

request.message.header.request.bodylen= htonl((uint32_t) (key_length
request.message.header.request.bodylen= htonl((uint32_t) (key_length
+memcached_array_size(memc->_namespace)
+request.message.header.request.extlen));

Expand Down
2 changes: 1 addition & 1 deletion libmemcached/exist.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
*
*
* Libmemcached library
*
* Copyright (C) 2011 Data Differential, http://datadifferential.com/
Expand Down
2 changes: 1 addition & 1 deletion libmemcached/fetch.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
*
*
* Libmemcached library
*
* Copyright (C) 2011 Data Differential, http://datadifferential.com/
Expand Down
Loading

0 comments on commit 7d12456

Please sign in to comment.