优化代码

This commit is contained in:
薛蒙恩
2021-02-05 14:35:27 +08:00
committed by Gitee
parent 1c216c3319
commit 5579cd3984

View File

@ -1172,8 +1172,8 @@ do_gucset(const char *action_type, const char *data_dir)
}
}
if (strncmp(config_param[i], "replconninfo", strlen("replconninfo")) == 0 &&
config_value[i] != NULL && (config_value[i] == "" || strncmp(config_value[i], "''", strlen("''")) == 0) &&
if (strncmp(config_param[i], "replconninfo", strlen("replconninfo")) == 0 &&
config_value[i] != NULL && (strlen(config_value[i]) == 0 || strncmp(config_value[i], "''", strlen("''")) == 0) &&
IsLastNotNullReplconninfo(opt_lines, config_param[i])) {
write_stderr("\nWARNING: This is the last valid replConnInfo, once set to null, "
"the host role will be changed to Normal if the local_role is primary now.\n");