fix return type of snprintf

Found by Coverity Scan. Compile-tested only.
update LUABackend::setDomainMetadata signature

Found by Coverity Scan. Compile-tested only.