Skip to content

Commit 657468f

Browse files
committed
refactor: remove unnecessary code
1 parent 151c592 commit 657468f

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

brotli.c

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -920,22 +920,6 @@ php_stream_brotli_opener(
920920
}
921921
}
922922

923-
if (level > BROTLI_MAX_QUALITY) {
924-
php_error_docref(NULL, E_WARNING,
925-
"brotli: set compression level (%d)"
926-
" to BROTLI_COMPRESS_LEVEL_MAX:"
927-
" must be within %d..%d",
928-
level, BROTLI_MIN_QUALITY, BROTLI_MAX_QUALITY);
929-
level = BROTLI_MAX_QUALITY;
930-
} else if (level < BROTLI_MIN_QUALITY) {
931-
php_error_docref(NULL, E_WARNING,
932-
"brotli: set compression level (%d)"
933-
" to BROTLI_COMPRESS_LEVEL_DEFAULT:"
934-
" must be within %d..%d",
935-
level, BROTLI_MIN_QUALITY, BROTLI_MAX_QUALITY);
936-
level = BROTLI_DEFAULT_QUALITY;
937-
}
938-
939923
self = ecalloc(sizeof(*self), 1);
940924
self->stream = php_stream_open_wrapper(path, mode,
941925
options | REPORT_ERRORS, NULL);
@@ -991,7 +975,6 @@ php_stream_brotli_opener(
991975

992976
return php_stream_alloc(&php_stream_brotli_read_ops, self, NULL, mode);
993977
}
994-
return NULL;
995978
}
996979

997980
static php_stream_wrapper_ops brotli_stream_wops = {

0 commit comments

Comments
 (0)