@@ -1604,10 +1604,7 @@ unsafe fn ZSTD_initCCtx(cctx: *mut ZSTD_CCtx, memManager: ZSTD_customMem) {
16041604}
16051605#[ cfg_attr( feature = "export-symbols" , export_name = crate :: prefix!( ZSTD_createCCtx_advanced ) ) ]
16061606pub unsafe extern "C" fn ZSTD_createCCtx_advanced ( customMem : ZSTD_customMem ) -> * mut ZSTD_CCtx {
1607- if ( customMem. customAlloc ) . is_none ( ) as core:: ffi:: c_int
1608- ^ ( customMem. customFree ) . is_none ( ) as core:: ffi:: c_int
1609- != 0
1610- {
1607+ if customMem. customAlloc . is_none ( ) ^ customMem. customFree . is_none ( ) {
16111608 return core:: ptr:: null_mut ( ) ;
16121609 }
16131610 let cctx = ZSTD_customMalloc ( :: core:: mem:: size_of :: < ZSTD_CCtx > ( ) , customMem) as * mut ZSTD_CCtx ;
@@ -1954,10 +1951,7 @@ unsafe fn ZSTD_makeCCtxParamsFromCParams(cParams: ZSTD_compressionParameters) ->
19541951}
19551952unsafe fn ZSTD_createCCtxParams_advanced ( customMem : ZSTD_customMem ) -> * mut ZSTD_CCtx_params {
19561953 let mut params = core:: ptr:: null_mut :: < ZSTD_CCtx_params > ( ) ;
1957- if ( customMem. customAlloc ) . is_none ( ) as core:: ffi:: c_int
1958- ^ ( customMem. customFree ) . is_none ( ) as core:: ffi:: c_int
1959- != 0
1960- {
1954+ if customMem. customAlloc . is_none ( ) ^ customMem. customFree . is_none ( ) {
19611955 return core:: ptr:: null_mut ( ) ;
19621956 }
19631957 params = ZSTD_customCalloc ( :: core:: mem:: size_of :: < ZSTD_CCtx_params > ( ) , customMem)
@@ -8639,10 +8633,7 @@ unsafe fn ZSTD_createCDict_advanced_internal(
86398633 enableDedicatedDictSearch : core:: ffi:: c_int ,
86408634 customMem : ZSTD_customMem ,
86418635) -> * mut ZSTD_CDict {
8642- if ( customMem. customAlloc ) . is_none ( ) as core:: ffi:: c_int
8643- ^ ( customMem. customFree ) . is_none ( ) as core:: ffi:: c_int
8644- != 0
8645- {
8636+ if customMem. customAlloc . is_none ( ) ^ customMem. customFree . is_none ( ) {
86468637 return core:: ptr:: null_mut ( ) ;
86478638 }
86488639 let workspaceSize = ( ZSTD_cwksp_alloc_size ( :: core:: mem:: size_of :: < ZSTD_CDict > ( ) ) )
@@ -8790,10 +8781,7 @@ pub unsafe extern "C" fn ZSTD_createCDict_advanced2(
87908781 strategy : 0 ,
87918782 } ;
87928783 let mut cdict = core:: ptr:: null_mut :: < ZSTD_CDict > ( ) ;
8793- if ( customMem. customAlloc ) . is_none ( ) as core:: ffi:: c_int
8794- ^ ( customMem. customFree ) . is_none ( ) as core:: ffi:: c_int
8795- != 0
8796- {
8784+ if customMem. customAlloc . is_none ( ) ^ customMem. customFree . is_none ( ) {
87978785 return core:: ptr:: null_mut ( ) ;
87988786 }
87998787 if cctxParams. enableDedicatedDictSearch != 0 {
0 commit comments