[srp-server] fix clang-tidy warnings (#6822)

- enable SRP server in clang-tidy check
- remove static member access through instance
This commit is contained in:
Jonathan Hui
2021-07-16 09:49:18 -07:00
committed by GitHub
parent d89f9222f0
commit 5f39ba055b
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -114,6 +114,7 @@ readonly OT_CLANG_TIDY_BUILD_OPTS=(
'-DOT_SLAAC=ON'
'-DOT_SNTP_CLIENT=ON'
'-DOT_SRP_CLIENT=ON'
'-DOT_SRP_SERVER=ON'
'-DOT_THREAD_VERSION=1.2'
'-DOT_TREL=ON'
'-DOT_COVERAGE=ON'
+1 -1
View File
@@ -1853,7 +1853,7 @@ Server::UpdateMetadata *Server::UpdateMetadata::New(Instance & aIn
void * buf;
UpdateMetadata *update = nullptr;
buf = aInstance.HeapCAlloc(1, sizeof(UpdateMetadata));
buf = Instance::HeapCAlloc(1, sizeof(UpdateMetadata));
VerifyOrExit(buf != nullptr);
update = new (buf) UpdateMetadata(aInstance, aHeader, aHost, aMessageInfo);