Fix an invalid condition check when detecting a lock-file change

It is obvious that the '!cfg_obj_asstring(obj)' check should be
'cfg_obj_asstring(obj)' instead, because it is an AND logic chain
which further uses 'obj' as a string.

Fix the error.
This commit is contained in:
Aram Sargsyan 2023-10-26 12:24:17 +00:00
parent fc2dd09390
commit bc891e749f

View file

@ -8151,7 +8151,7 @@ check_lockfile(named_server_t *server, const cfg_obj_t *config,
(void)named_config_get(maps, "lock-file", &obj);
if (!first_time) {
if (obj != NULL && !cfg_obj_isstring(obj) &&
if (obj != NULL && cfg_obj_isstring(obj) &&
server->lockfile != NULL &&
strcmp(cfg_obj_asstring(obj), server->lockfile) != 0)
{