From 31a20f0fbb6cdd59fa404bd22dcd62806e88f50e Mon Sep 17 00:00:00 2001 From: antirez Date: Fri, 20 Sep 2019 11:46:35 +0200 Subject: [PATCH] Make config.c always_replicate_commands more uniform. Better if it resembles the other similar code paths. --- src/config.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/config.c b/src/config.c index fe002bac2..d37e3c566 100644 --- a/src/config.c +++ b/src/config.c @@ -671,10 +671,10 @@ void loadServerConfigFromString(char *config) { } else if (!strcasecmp(argv[0],"lua-time-limit") && argc == 2) { server.lua_time_limit = strtoll(argv[1],NULL,10); } else if (!strcasecmp(argv[0],"lua-replicate-commands") && argc == 2) { - if ((server.lua_always_replicate_commands = yesnotoi(argv[1])) - == -1) - { - err = "argument must be 'yes' or 'no'"; goto loaderr; + server.lua_always_replicate_commands = yesnotoi(argv[1]); + if (server.lua_always_replicate_commands == -1) { + err = "argument must be 'yes' or 'no'"; + goto loaderr; } } else if (!strcasecmp(argv[0],"slowlog-log-slower-than") && argc == 2)