Skip to content

Commit fd5a4fe

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent ae961a1 commit fd5a4fe

1 file changed

Lines changed: 8 additions & 12 deletions

File tree

src/platform/Darwin/dnssd/DnssdImpl.cpp

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -482,8 +482,7 @@ static CHIP_ERROR Resolve(void * context, DnssdResolveCallback callback, uint32_
482482
ResolveContext * primaryCtx = RescueDeferredResolveContexts(name, siblingsToDiscard);
483483
if (primaryCtx != nullptr)
484484
{
485-
ChipLogProgress(Discovery,
486-
"Mdns: Rescuing deferred-teardown ResolveContext for %s (sacrificing %zu sibling(s))",
485+
ChipLogProgress(Discovery, "Mdns: Rescuing deferred-teardown ResolveContext for %s (sacrificing %zu sibling(s))",
487486
StringOrNullMarker(name), siblingsToDiscard.size());
488487

489488
// Validate the new caller's parameters against the rescued context.
@@ -496,8 +495,7 @@ static CHIP_ERROR Resolve(void * context, DnssdResolveCallback callback, uint32_
496495
bool paramsCompatible = (primaryCtx->protocol == GetResolveProtocolForAddressType(addressType));
497496
if (!paramsCompatible)
498497
{
499-
ChipLogProgress(Discovery,
500-
"Mdns: Rescue declined for %s due to addressType mismatch; opening fresh DNSServiceResolve",
498+
ChipLogProgress(Discovery, "Mdns: Rescue declined for %s due to addressType mismatch; opening fresh DNSServiceResolve",
501499
StringOrNullMarker(name));
502500
std::vector<GenericContext *> declined;
503501
declined.push_back(primaryCtx);
@@ -564,15 +562,13 @@ static CHIP_ERROR Resolve(DiscoverNodeDelegate * delegate, uint32_t interfaceId,
564562
ResolveContext * primaryCtx = RescueDeferredResolveContexts(name, siblingsToDiscard);
565563
if (primaryCtx != nullptr)
566564
{
567-
ChipLogProgress(Discovery,
568-
"Mdns: Rescuing deferred-teardown ResolveContext for %s (delegate; sacrificing %zu sibling(s))",
565+
ChipLogProgress(Discovery, "Mdns: Rescuing deferred-teardown ResolveContext for %s (delegate; sacrificing %zu sibling(s))",
569566
StringOrNullMarker(name), siblingsToDiscard.size());
570567

571568
bool paramsCompatible = (primaryCtx->protocol == GetResolveProtocolForAddressType(addressType));
572569
if (!paramsCompatible)
573570
{
574-
ChipLogProgress(Discovery,
575-
"Mdns: Rescue declined for %s due to addressType mismatch; opening fresh DNSServiceResolve",
571+
ChipLogProgress(Discovery, "Mdns: Rescue declined for %s due to addressType mismatch; opening fresh DNSServiceResolve",
576572
StringOrNullMarker(name));
577573
std::vector<GenericContext *> declined;
578574
declined.push_back(primaryCtx);
@@ -881,7 +877,7 @@ CHIP_ERROR ChipDnssdStopBrowse(intptr_t browseIdentifier)
881877
std::vector<ResolveContext *> alreadyDeferredToPromote;
882878
for (auto * item : resolves)
883879
{
884-
auto * rctx = static_cast<ResolveContext *>(item);
880+
auto * rctx = static_cast<ResolveContext *>(item);
885881
const std::string & name = rctx->instanceName;
886882
if (instanceNamesAlreadyDecremented.count(name) > 0)
887883
{
@@ -966,9 +962,9 @@ CHIP_ERROR ChipDnssdStopBrowse(intptr_t browseIdentifier)
966962
// deferred window is a no-op rather than a UAF.
967963
for (auto * s : siblings)
968964
{
969-
auto * sctx = static_cast<ResolveContext *>(s);
970-
sctx->callback = nullptr;
971-
sctx->context = nullptr;
965+
auto * sctx = static_cast<ResolveContext *>(s);
966+
sctx->callback = nullptr;
967+
sctx->context = nullptr;
972968
}
973969
ScheduleDeferredTeardownForResolves(siblings, instanceNameRaw);
974970
}

0 commit comments

Comments
 (0)