From cd2eed0d364bb47e59049f760ed56baccb77e03c Mon Sep 17 00:00:00 2001 From: Nick Lockwood Date: Fri, 22 Jan 2016 08:39:44 -0800 Subject: [PATCH] RCTGzipData() acceps nil input, but was not marked as returning nullable output Reviewed By: milend Differential Revision: D2854721 fb-gh-sync-id: 336b3261f1694bcc173f267582561c0314c0cea0 --- React/Base/RCTUtils.h | 2 +- React/Base/RCTUtils.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/React/Base/RCTUtils.h b/React/Base/RCTUtils.h index 811c66d1a..30febd5a3 100644 --- a/React/Base/RCTUtils.h +++ b/React/Base/RCTUtils.h @@ -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) diff --git a/React/Base/RCTUtils.m b/React/Base/RCTUtils.m index d2a0916b3..7b69da74b 100644 --- a/React/Base/RCTUtils.m +++ b/React/Base/RCTUtils.m @@ -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;