Skip to content

Commit

Permalink
format code
Browse files Browse the repository at this point in the history
Signed-off-by: skyfirelee <[email protected]>
  • Loading branch information
artikell committed Jan 12, 2025
1 parent 6156c1c commit 87709c2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/anet.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ int anetKeepAlive(char *err, int fd, int interval) {
if (idle < 10) idle = 10; // kernel expects at least 10 seconds
if (idle > 10 * 24 * 60 * 60) idle = 10 * 24 * 60 * 60; // kernel expects at most 10 days

/* `TCP_KEEPIDLE`, `TCP_KEEPINTVL`, and `TCP_KEEPCNT` were not available on Solaris
* until version 11.4, but let's take a chance here. */
/* `TCP_KEEPIDLE`, `TCP_KEEPINTVL`, and `TCP_KEEPCNT` were not available on Solaris
* until version 11.4, but let's take a chance here. */
#if defined(TCP_KEEPIDLE) && defined(TCP_KEEPINTVL) && defined(TCP_KEEPCNT)
if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &idle, sizeof(idle))) {
anetSetError(err, "setsockopt TCP_KEEPIDLE: %s\n", strerror(errno));
Expand Down
4 changes: 2 additions & 2 deletions src/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -738,8 +738,8 @@ void dismissObject(robj *o, size_t size_hint) {
/* madvise(MADV_DONTNEED) may not work if Transparent Huge Pages is enabled. */
if (server.thp_enabled) return;

/* Currently we use zmadvise_dontneed only when we use jemalloc with Linux.
* so we avoid these pointless loops when they're not going to do anything. */
/* Currently we use zmadvise_dontneed only when we use jemalloc with Linux.
* so we avoid these pointless loops when they're not going to do anything. */
#if defined(USE_JEMALLOC) && defined(__linux__)
if (o->refcount != 1) return;
switch (o->type) {
Expand Down
6 changes: 3 additions & 3 deletions src/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -6565,8 +6565,8 @@ void dismissMemoryInChild(void) {
/* madvise(MADV_DONTNEED) may not work if Transparent Huge Pages is enabled. */
if (server.thp_enabled) return;

/* Currently we use zmadvise_dontneed only when we use jemalloc with Linux.
* so we avoid these pointless loops when they're not going to do anything. */
/* Currently we use zmadvise_dontneed only when we use jemalloc with Linux.
* so we avoid these pointless loops when they're not going to do anything. */
#if defined(USE_JEMALLOC) && defined(__linux__)
listIter li;
listNode *ln;
Expand Down Expand Up @@ -7011,7 +7011,7 @@ __attribute__((weak)) int main(int argc, char **argv) {
}
if (server.sentinel_mode) sentinelCheckConfigFile();

/* Do system checks */
/* Do system checks */
#ifdef __linux__
linuxMemoryWarnings();
sds err_msg = NULL;
Expand Down

0 comments on commit 87709c2

Please sign in to comment.