File tree Expand file tree Collapse file tree 1 file changed +3
-14
lines changed
Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -496,7 +496,6 @@ _zstd__get_frame_info_impl(PyObject *module, Py_buffer *frame_buffer)
496496{
497497 uint64_t decompressed_size ;
498498 uint32_t dict_id ;
499- PyObject * ret = NULL ;
500499
501500 /* ZSTD_getFrameContentSize */
502501 decompressed_size = ZSTD_getFrameContentSize (frame_buffer -> buf ,
@@ -511,27 +510,17 @@ _zstd__get_frame_info_impl(PyObject *module, Py_buffer *frame_buffer)
511510 "a zstd frame. Make sure the frame_buffer argument "
512511 "starts from the beginning of a frame, and its length "
513512 "not less than the frame header (6~18 bytes)." );
514- goto error ;
513+ return NULL ;
515514 }
516515
517516 /* ZSTD_getDictID_fromFrame */
518517 dict_id = ZSTD_getDictID_fromFrame (frame_buffer -> buf , frame_buffer -> len );
519518
520519 /* Build tuple */
521520 if (decompressed_size == ZSTD_CONTENTSIZE_UNKNOWN ) {
522- ret = Py_BuildValue ("OI" , Py_None , dict_id );
523- } else {
524- ret = Py_BuildValue ("KI" , decompressed_size , dict_id );
521+ return Py_BuildValue ("OI" , Py_None , dict_id );
525522 }
526-
527- if (ret == NULL ) {
528- goto error ;
529- }
530- goto success ;
531- error :
532- Py_CLEAR (ret );
533- success :
534- return ret ;
523+ return Py_BuildValue ("KI" , decompressed_size , dict_id );
535524}
536525
537526/*[clinic input]
You can’t perform that action at this time.
0 commit comments