Remove REDIS tag from REDIS_CONFIG_REWRITE_SIGNATURE. (#331)

This macros is used to add rewrite string in src/config.c and removing
the redis will not effect log or output.

Signed-off-by: Shivshankar-Reddy <shiva.sheri.github@gmail.com>
This commit is contained in:
Shivshankar 2024-04-17 23:38:39 -04:00 committed by GitHub
parent 96d14fe263
commit 3040c439b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1018,7 +1018,7 @@ void configGetCommand(client *c) {
* CONFIG REWRITE implementation
*----------------------------------------------------------------------------*/
#define REDIS_CONFIG_REWRITE_SIGNATURE "# Generated by CONFIG REWRITE"
#define CONFIG_REWRITE_SIGNATURE "# Generated by CONFIG REWRITE"
/* We use the following dictionary type to store where a configuration
* option is mentioned in the old configuration file, so it's
@ -1159,7 +1159,7 @@ struct rewriteConfigState *rewriteConfigReadOldFile(char *path) {
/* Handle comments and empty lines. */
if (line[0] == '#' || line[0] == '\0') {
if (state->needs_signature && !strcmp(line,REDIS_CONFIG_REWRITE_SIGNATURE))
if (state->needs_signature && !strcmp(line,CONFIG_REWRITE_SIGNATURE))
state->needs_signature = 0;
rewriteConfigAppendLine(state,line);
continue;
@ -1264,7 +1264,7 @@ int rewriteConfigRewriteLine(struct rewriteConfigState *state, const char *optio
/* Append a new line. */
if (state->needs_signature) {
rewriteConfigAppendLine(state,
sdsnew(REDIS_CONFIG_REWRITE_SIGNATURE));
sdsnew(CONFIG_REWRITE_SIGNATURE));
state->needs_signature = 0;
}
rewriteConfigAppendLine(state,line);