From a8907e1e631f98e7e4c36b9d517babd7268d78e0 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Mon, 29 Aug 2022 14:55:34 +0000 Subject: [PATCH] Restyled by clang-format --- src/darwin/Framework/CHIP/MTRDeviceController.h | 2 +- src/darwin/Framework/CHIP/MTRDeviceController.mm | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.h b/src/darwin/Framework/CHIP/MTRDeviceController.h index 0aaf453a4f545d..91e985fe952c11 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.h +++ b/src/darwin/Framework/CHIP/MTRDeviceController.h @@ -139,7 +139,7 @@ typedef void (^MTRDeviceConnectionCallback)(MTRBaseDevice * _Nullable device, NS * * Attempts to retreive the generated attestation challenge from a commissionee with the given Device ID. * Returns nil if given Device ID does not match an active commissionee, or if a Secure Session is not availale. -*/ + */ - (nullable NSData *)generateAttestationChallengeForDeviceId:(uint64_t)deviceId; /** diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index a70892d8d247b4..d122d28f93e16f 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -71,8 +71,8 @@ static NSString * const kErrorGenerateNOC = @"Generating operational certificate failed"; static NSString * const kErrorKeyAllocation = @"Generating new operational key failed"; static NSString * const kErrorCSRValidation = @"Extracting public key from CSR failed"; -static NSString * const kErrorGetCommissionee = @"Failure obtaining device being commissioned" -static NSString * const kErrorGetAttestationChallenge = @"Failure getting attestation challenge" +static NSString * const kErrorGetCommissionee = @"Failure obtaining device being commissioned"; +static NSString * const kErrorGetAttestationChallenge = @"Failure getting attestation challenge"; @interface MTRDeviceController () @@ -707,14 +707,14 @@ - (nullable NSData *)computePaseVerifier:(uint32_t)setupPincode iterations:(uint - (nullable NSData *)generateAttestationChallengeForDeviceId:(uint64_t)deviceId { - VerifyOrReturn([self checkIsRunning], nil); + VerifyOrReturnValue([self checkIsRunning], nil); __block NSData * attestationChallenge; dispatch_sync(_chipWorkQueue, ^{ VerifyOrReturn([self checkIsRunning]); chip::CommissioneeDeviceProxy * deviceProxy; - errorCode = self.cppCommissioner->GetDeviceBeingCommissioned(deviceId, &deviceProxy); + auto errorCode = self.cppCommissioner->GetDeviceBeingCommissioned(deviceId, &deviceProxy); auto success = ![self checkForError:errorCode logMsg:kErrorGetCommissionee error:nil]; VerifyOrReturn(success);