Apply suggestions from code review
Apply suggestions from code review

Co-authored-by: Nick Rolfe <8953587f6b45579eee4ec760aa9ba72fab9a1166@github.com>
github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql