Skip to content

Commit

Permalink
refine code format
Browse files Browse the repository at this point in the history
Signed-off-by: azuredream <zhaozixuan67@gmail.com>
  • Loading branch information
azuredream committed Oct 20, 2024
1 parent ca0cedf commit a6b0246
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,12 @@ bool hasInvalidLogfmtChar(const char *msg) {
/* Modifies the input string by:
* replacing \r and \n with whitespace
* replacing " with '
*
*
* Parameters:
* safemsg - A char pointer where the modified message will be stored
* safemsglen - size of safemsg
* msg - The original message */
void filterInvalidLogfmtChar(char* safemsg, size_t safemsglen, const char *msg) {
void filterInvalidLogfmtChar(char *safemsg, size_t safemsglen, const char *msg) {
serverAssert(safemsglen == LOG_MAX_LEN);
if (msg == NULL) return;

Expand Down Expand Up @@ -220,7 +220,7 @@ void serverLogRaw(int level, const char *msg) {
} else if (pid != server.pid) {
role_index = 1; /* RDB / AOF writing child. */
} else {
role_index = (server.primary_host ? 2 : 3); /* Slave or Master. */
role_index = (server.primary_host ? 2 : 3); /* Replica or Primary. */
}
switch (server.log_format) {
case LOG_FORMAT_LOGFMT:
Expand Down

0 comments on commit a6b0246

Please sign in to comment.