Skip to content

Commit

Permalink
Remove the bool and compare with argv
Browse files Browse the repository at this point in the history
Signed-off-by: Shivshankar-Reddy <[email protected]>
  • Loading branch information
Shivshankar-Reddy committed May 1, 2024
1 parent ed99e67 commit 00d7cb5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/aof.c
Original file line number Diff line number Diff line change
Expand Up @@ -1224,7 +1224,7 @@ void flushAppendOnlyFile(int force) {
* OK state and log the event. */
if (server.aof_last_write_status == C_ERR) {
serverLog(LL_NOTICE,
"AOF write error looks solved, The server can write again.");
"AOF write error looks solved. The server can write again.");
server.aof_last_write_status = C_OK;
}
}
Expand Down Expand Up @@ -2471,7 +2471,7 @@ int rewriteAppendOnlyFileBackground(void) {
char tmpfile[256];

/* Child */
if (server.server_symlink) {
if (strstr(server.exec_argv[0],"redis-server") != NULL) {
serverSetProcTitle("redis-aof-rewrite");
} else {
serverSetProcTitle("valkey-aof-rewrite");
Expand Down
9 changes: 0 additions & 9 deletions src/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -6992,15 +6992,6 @@ int main(int argc, char **argv) {
char *exec_name = strrchr(argv[0], '/');
if (exec_name == NULL) exec_name = argv[0];
server.sentinel_mode = checkForSentinelMode(argc,argv, exec_name);

/* Determine Valkey is started by using symlinks, server.server_symlink can be used
* to set actual process name later. */
if (strstr(exec_name,"redis-server") != NULL) {
server.server_symlink = VALKEY_SYMLINKED;
} else {
server.server_symlink = VALKEY_NOT_SYMLINKED;
}

initServerConfig();
ACLInit(); /* The ACL subsystem must be initialized ASAP because the
basic networking code and client creation depends on it. */
Expand Down
4 changes: 0 additions & 4 deletions src/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,6 @@ struct hdr_histogram;
/* helpers */
#define numElements(x) (sizeof(x)/sizeof((x)[0]))

#define VALKEY_NOT_SYMLINKED 0 /* To determine Valkey started using symlink */
#define VALKEY_SYMLINKED 1 /* To determine Valkey started using symlink */

/* min/max */
#undef min
#undef max
Expand Down Expand Up @@ -2076,7 +2073,6 @@ struct valkeyServer {
int reply_buffer_resizing_enabled; /* Is reply buffer resizing enabled (1 by default) */
/* Local environment */
char *locale_collate;
int server_symlink;
};

#define MAX_KEYS_BUFFER 256
Expand Down

0 comments on commit 00d7cb5

Please sign in to comment.