IOSAD-172 Less casting IOSAD-172
authorDirk Zimmermann <dz@pep.security>
Sat, 27 Jun 2020 14:35:15 +0200
branchIOSAD-172
changeset 151032a247365edb
parent 1509 e1bcdfecf40b
child 1511 a4d7dc99ec1d
IOSAD-172 Less casting
pEpObjCAdapter/PEPInternalSession+PassphraseCache.h
pEpObjCAdapter/PEPInternalSession+PassphraseCache.m
     1.1 --- a/pEpObjCAdapter/PEPInternalSession+PassphraseCache.h	Sat Jun 27 14:32:16 2020 +0200
     1.2 +++ b/pEpObjCAdapter/PEPInternalSession+PassphraseCache.h	Sat Jun 27 14:35:15 2020 +0200
     1.3 @@ -21,7 +21,7 @@
     1.4  /// until it returns something else other than PEP_PASSPHRASE_REQUIRED
     1.5  /// or PEP_WRONG_PASSPHRASE, or there are no passwords anymore.
     1.6  /// @param block The status-returning block to execute against different passwords
     1.7 -- (PEP_STATUS)runWithPasswords:(PEP_STATUS (^)(PEP_SESSION session))block;
     1.8 +- (PEPStatus)runWithPasswords:(PEP_STATUS (^)(PEP_SESSION session))block;
     1.9  
    1.10  @end
    1.11  
     2.1 --- a/pEpObjCAdapter/PEPInternalSession+PassphraseCache.m	Sat Jun 27 14:32:16 2020 +0200
     2.2 +++ b/pEpObjCAdapter/PEPInternalSession+PassphraseCache.m	Sat Jun 27 14:35:15 2020 +0200
     2.3 @@ -14,7 +14,7 @@
     2.4  
     2.5  @implementation PEPInternalSession (PassphraseCache)
     2.6  
     2.7 -- (PEP_STATUS)runWithPasswords:(PEP_STATUS (^)(PEP_SESSION session))block
     2.8 +- (PEPStatus)runWithPasswords:(PEP_STATUS (^)(PEP_SESSION session))block
     2.9  {
    2.10      PEP_STATUS lastStatus = PEP_UNKNOWN_ERROR;
    2.11  
    2.12 @@ -23,19 +23,19 @@
    2.13          PEP_STATUS status = config_passphrase(self.session, [passphrase UTF8String]);
    2.14  
    2.15          if (status != PEPStatusOK) {
    2.16 -            return status;
    2.17 +            return (PEPStatus) status;
    2.18          }
    2.19  
    2.20          lastStatus = block(self.session);
    2.21  
    2.22          if (lastStatus != PEP_PASSPHRASE_REQUIRED && lastStatus != PEP_WRONG_PASSPHRASE) {
    2.23 -            return lastStatus;
    2.24 +            return (PEPStatus) lastStatus;
    2.25          }
    2.26      }
    2.27  
    2.28      // If execution lands here, it means we ran out of passwords to set while
    2.29      // receiving password-related error codes.
    2.30 -    return lastStatus;
    2.31 +    return (PEPStatus) lastStatus;
    2.32  }
    2.33  
    2.34  @end