File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -30,8 +30,7 @@ - (id)initWithParameters:(NSDictionary *)postParameters;
30
30
{
31
31
self = [self init ];
32
32
if (self) {
33
- srandom (time (NULL ));
34
- boundary = [[NSString alloc ] initWithFormat: @" ------------nx-oauth2%d " , rand ()];
33
+ boundary = [[NSString alloc ] initWithFormat: @" ------------nx-oauth2%@ " , @(arc4random ())];
35
34
numBytesTotal = 0 ;
36
35
streamIndex = 0 ;
37
36
@@ -88,7 +87,7 @@ - (NSArray *)streamsForParameters:(NSDictionary *)parameters contentLength:(unsi
88
87
NSData *delimiterData = [delimiter dataUsingEncoding: NSUTF8StringEncoding];
89
88
NSData *contentHeaderData = [[part contentHeaders ] dataUsingEncoding: NSUTF8StringEncoding];
90
89
91
- int dataLength = delimiterData.length + contentHeaderData.length ;
90
+ NSUInteger dataLength = delimiterData.length + contentHeaderData.length ;
92
91
NSMutableData *headerData = [NSMutableData dataWithCapacity: dataLength];
93
92
[headerData appendData: delimiterData];
94
93
[headerData appendData: contentHeaderData];
@@ -146,7 +145,7 @@ - (NSInteger)read:(uint8_t *)buffer maxLength:(NSUInteger)len;
146
145
if (currentStream == nil )
147
146
return 0 ;
148
147
149
- int result = [currentStream read: buffer maxLength: len];
148
+ NSInteger result = [currentStream read: buffer maxLength: len];
150
149
151
150
if (result == 0 ) {
152
151
if (streamIndex < contentStreams.count - 1 ) {
You can’t perform that action at this time.
0 commit comments