Skip to content

Commit c016a7a

Browse files
author
Andreas Guenther
committed
Fixing complaints from @toto
1 parent 8415416 commit c016a7a

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Sources/OAuth2Client/NXOAuth2AccountStore.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ + (NSDictionary *)accountsFromDefaultKeychain;
611611
result = (__bridge_transfer NSDictionary *)cfResult;
612612

613613
if (status != noErr) {
614-
NSAssert1(status == errSecItemNotFound, @"Unexpected error while fetching accounts from keychain: %ld", status);
614+
NSAssert1(status == errSecItemNotFound, @"Unexpected error while fetching accounts from keychain: %zd", status);
615615
return nil;
616616
}
617617

@@ -632,7 +632,7 @@ + (void)storeAccountsInDefaultKeychain:(NSDictionary *)accounts;
632632
data, kSecAttrGeneric,
633633
nil];
634634
OSStatus __attribute__((unused)) err = SecItemAdd((__bridge CFDictionaryRef)query, NULL);
635-
NSAssert1(err == noErr, @"Error while adding token to keychain: %ld", err);
635+
NSAssert1(err == noErr, @"Error while adding token to keychain: %zd", err);
636636
}
637637

638638
+ (void)removeFromDefaultKeychain;
@@ -643,7 +643,7 @@ + (void)removeFromDefaultKeychain;
643643
serviceName, kSecAttrService,
644644
nil];
645645
OSStatus __attribute__((unused)) err = SecItemDelete((__bridge CFDictionaryRef)query);
646-
NSAssert1((err == noErr || err == errSecItemNotFound), @"Error while deleting token from keychain: %ld", err);
646+
NSAssert1((err == noErr || err == errSecItemNotFound), @"Error while deleting token from keychain: %zd", err);
647647

648648
}
649649

Sources/OAuth2Client/NXOAuth2Connection.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,9 @@ - (void)applyParameters:(NSDictionary *)parameters onRequest:(NSMutableURLReques
223223
NSString *httpMethod = [aRequest HTTPMethod];
224224
if ([httpMethod caseInsensitiveCompare:@"POST"] != NSOrderedSame
225225
&& [httpMethod caseInsensitiveCompare:@"PUT"] != NSOrderedSame) {
226+
226227
aRequest.URL = [aRequest.URL nxoauth2_URLByAddingParameters:parameters];
228+
227229
} else {
228230

229231
NSString *contentType = [aRequest valueForHTTPHeaderField:@"Content-Type"];
@@ -241,7 +243,7 @@ - (void)applyParameters:(NSDictionary *)parameters onRequest:(NSMutableURLReques
241243

242244
[aRequest setHTTPBodyStream:postBodyStream];
243245

244-
}else if ([contentType isEqualToString:@"application/x-www-form-urlencoded"]) {
246+
} else if ([contentType isEqualToString:@"application/x-www-form-urlencoded"]) {
245247

246248
// sends the POST/PUT request as application/x-www-form-urlencoded
247249

0 commit comments

Comments
 (0)