Skip to content

Commit

Permalink
RCTGzipData() acceps nil input, but was not marked as returning nulla…
Browse files Browse the repository at this point in the history
…ble output

Reviewed By: milend

Differential Revision: D2854721

fb-gh-sync-id: 336b3261f1694bcc173f267582561c0314c0cea0
  • Loading branch information
nicklockwood authored and facebook-github-bot-4 committed Jan 22, 2016
1 parent 581434a commit cd2eed0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion React/Base/RCTUtils.h
Expand Up @@ -97,7 +97,7 @@ RCT_EXTERN double RCTZeroIfNaN(double value);
RCT_EXTERN NSURL *RCTDataURL(NSString *mimeType, NSData *data);

// Gzip functionality - compression level in range 0 - 1 (-1 for default)
RCT_EXTERN NSData *RCTGzipData(NSData *__nullable data, float level);
RCT_EXTERN NSData *__nullable RCTGzipData(NSData *__nullable data, float level);

// Returns the relative path within the main bundle for an absolute URL
// (or nil, if the URL does not specify a path within the main bundle)
Expand Down
2 changes: 1 addition & 1 deletion React/Base/RCTUtils.m
Expand Up @@ -451,7 +451,7 @@ BOOL RCTIsGzippedData(NSData *__nullable data)
return (data.length >= 2 && bytes[0] == 0x1f && bytes[1] == 0x8b);
}

NSData *RCTGzipData(NSData *__nullable input, float level)
NSData *__nullable RCTGzipData(NSData *__nullable input, float level)
{
if (input.length == 0 || RCTIsGzippedData(input)) {
return input;
Expand Down

0 comments on commit cd2eed0

Please sign in to comment.