Skip to content

Commit 797ddae

Browse files
restyled-commitsnivi-apple
authored andcommitted
Restyled by clang-format
1 parent 28de37b commit 797ddae

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

src/platform/Darwin/DnssdContexts.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ void RegisterContext::DispatchSuccess()
335335
mHostNameRegistrar.Register();
336336
}
337337

338-
BrowseContext * BrowseContext::sContextDispatchingSuccess = nullptr;
338+
BrowseContext * BrowseContext::sContextDispatchingSuccess = nullptr;
339339
std::vector<DnssdService> * BrowseContext::sDispatchedServices = nullptr;
340340

341341
BrowseContext::BrowseContext(void * cbContext, DnssdBrowseCallback cb, DnssdServiceProtocol cbContextProtocol)
@@ -370,7 +370,7 @@ void BrowseContext::DispatchPartialSuccess()
370370
}
371371
sDispatchedServices = &dnsServices;
372372
callback(context, dnsServices.data(), dnsServices.size(), false, CHIP_NO_ERROR);
373-
sDispatchedServices = nullptr;
373+
sDispatchedServices = nullptr;
374374
sContextDispatchingSuccess = nullptr;
375375
services.clear();
376376
}

src/platform/Darwin/DnssdImpl.cpp

+9-4
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,8 @@ static void OnResolve(DNSServiceRef sdRef, DNSServiceFlags flags, uint32_t inter
374374
}
375375
}
376376

377-
static CHIP_ERROR ResolveWithContext(ResolveContext * sdCtx, uint32_t interfaceId, const char * type, const char * name, const char * domain, ResolveContextWithType * contextWithType)
377+
static CHIP_ERROR ResolveWithContext(ResolveContext * sdCtx, uint32_t interfaceId, const char * type, const char * name,
378+
const char * domain, ResolveContextWithType * contextWithType)
378379
{
379380
auto sdRef = sdCtx->serviceRef; // Mandatory copy because of kDNSServiceFlagsShareConnection
380381

@@ -396,7 +397,9 @@ static CHIP_ERROR Resolve(ResolveContext * sdCtx, uint32_t interfaceId, chip::In
396397
// Otherwise we will try to resolve using both the local domain and the SRP domain.
397398
if (domain != nullptr)
398399
{
399-
ReturnErrorOnFailure(ResolveWithContext(sdCtx, interfaceId, type, name, domain, IsSRPType(domain) ? &sdCtx->resolveContextWithSRPType : &sdCtx->resolveContextWithNonSRPType));
400+
ReturnErrorOnFailure(
401+
ResolveWithContext(sdCtx, interfaceId, type, name, domain,
402+
IsSRPType(domain) ? &sdCtx->resolveContextWithSRPType : &sdCtx->resolveContextWithNonSRPType));
400403
sdCtx->shoulStartSRPTimerForResolve = false;
401404
}
402405
else
@@ -574,8 +577,10 @@ CHIP_ERROR ChipDnssdResolve(DnssdService * service, chip::Inet::InterfaceId inte
574577

575578
if (BrowseContext::sContextDispatchingSuccess != nullptr)
576579
{
577-
for (size_t i = 0; i < BrowseContext::sDispatchedServices->size(); ++i) {
578-
if (service == &BrowseContext::sDispatchedServices->at(i)) {
580+
for (size_t i = 0; i < BrowseContext::sDispatchedServices->size(); ++i)
581+
{
582+
if (service == &BrowseContext::sDispatchedServices->at(i))
583+
{
579584
domain = BrowseContext::sContextDispatchingSuccess->services[i].second.c_str();
580585
break;
581586
}

0 commit comments

Comments
 (0)