Skip to content

Commit 3fb4cec

Browse files
restyled-commitsnivi-apple
authored andcommitted
Restyled by clang-format
1 parent 82d1168 commit 3fb4cec

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

src/platform/Darwin/DnssdImpl.cpp

+5-4
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,17 @@ void LogOnFailure(const char * name, DNSServiceErrorType err)
7878
*/
7979
CHIP_ERROR StartSRPTimer(uint16_t timeoutInMSecs, ResolveContext * ctx)
8080
{
81-
// Check to see if an user default value exists for the SRP timeout. If it does, override the timeoutInMSecs with user default value.
82-
// To override the timeout value, use ` defaults write org.csa-iot.matter.darwindefaults SRPTimeoutOverride <timeoutinMsecs>`
83-
// See UserDefaultUtils.mm for details
81+
// Check to see if an user default value exists for the SRP timeout. If it does, override the timeoutInMSecs with user default
82+
// value. To override the timeout value, use ` defaults write org.csa-iot.matter.darwindefaults SRPTimeoutOverride
83+
// <timeoutinMsecs>` See UserDefaultUtils.mm for details
8484
uint16_t userDefaultSRPTimeout = getUserDefaultDnssdSRPTimeout();
8585
if (userDefaultSRPTimeout)
8686
{
8787
timeoutInMSecs = userDefaultSRPTimeout;
8888
}
8989
VerifyOrReturnValue(ctx != nullptr, CHIP_ERROR_INCORRECT_STATE);
90-
ChipLogProgress(Discovery, "Starting timer to wait for %d milliseconds for possible SRP resolve results for %s", timeoutInMSecs, ctx->instanceName.c_str());
90+
ChipLogProgress(Discovery, "Starting timer to wait for %d milliseconds for possible SRP resolve results for %s", timeoutInMSecs,
91+
ctx->instanceName.c_str());
9192
return chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Milliseconds16(timeoutInMSecs),
9293
ResolveContext::SRPTimerExpiredCallback, static_cast<void *>(ctx));
9394
}

src/platform/Darwin/UserDefaultUtils.mm

+8-9
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,22 @@
1919
* @file
2020
* Implementation for an utility to set configurable parametes via user defaults.
2121
*/
22-
#import <Foundation/Foundation.h>
2322
#import "UserDefaultUtils.h"
24-
23+
#import <Foundation/Foundation.h>
2524

2625
static NSString * const kUserDefaultDomain = @"org.csa-iot.matter.darwindefaults";
2726
static NSString * const kSRPTimeoutUserDefaultKey = @"SRPTimeoutOverride";
2827

2928
namespace chip {
3029
namespace DeviceLayer {
31-
namespace Utils {
30+
namespace Utils {
3231

33-
uint16_t getUserDefaultDnssdSRPTimeout()
34-
{
35-
NSUserDefaults * defaults = [[NSUserDefaults alloc] initWithSuiteName:kUserDefaultDomain];
36-
return static_cast<uint16_t>([defaults integerForKey:kSRPTimeoutUserDefaultKey]);
37-
}
32+
uint16_t getUserDefaultDnssdSRPTimeout()
33+
{
34+
NSUserDefaults * defaults = [[NSUserDefaults alloc] initWithSuiteName:kUserDefaultDomain];
35+
return static_cast<uint16_t>([defaults integerForKey:kSRPTimeoutUserDefaultKey]);
36+
}
3837

39-
} // namespace Utils
38+
} // namespace Utils
4039
} // namespace DeviceLayer
4140
} // namespace chip

0 commit comments

Comments
 (0)