named_server_sync() logged isc_result_totext(result) but returns
tresult. The loop accumulates errors into tresult, so result only
holds the last iteration's value. If the last view succeeded but an
earlier one failed, the log would incorrectly say "success".
Assisted-by: Claude:claude-opus-4-7
(cherry picked from commit
1b984b1f116134d8a93c5327217487928f6d324f)
NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
"dumping all zones%s: %s",
cleanup ? ", removing journal files" : "",
- isc_result_totext(result));
+ isc_result_totext(tresult));
return tresult;
}