From efafa2c0504a455ba8eee2274a612e0a4db9e9f9 Mon Sep 17 00:00:00 2001 From: Mark Kittisopikul Date: Wed, 13 Nov 2024 22:52:18 -0500 Subject: [PATCH] Apply formatting --- ext/CodecBzip2Ext/CodecBzip2Ext.jl | 6 ++++-- ext/CodecLz4Ext/CodecLz4Ext.jl | 3 ++- ext/bitshuffle_jll_ext/bitshuffle_jll_ext.jl | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ext/CodecBzip2Ext/CodecBzip2Ext.jl b/ext/CodecBzip2Ext/CodecBzip2Ext.jl index 184c7236..055abb1b 100644 --- a/ext/CodecBzip2Ext/CodecBzip2Ext.jl +++ b/ext/CodecBzip2Ext/CodecBzip2Ext.jl @@ -40,7 +40,8 @@ function H5Z_filter_bzip2( # Decompress outbuflen = nbytes * 3 + 1 - outbuflen <= 0 && error("H5Zbzip2: Non-positive outbuflen for malloc: $outbuflen.") + outbuflen <= 0 && + error("H5Zbzip2: Non-positive outbuflen for malloc: $outbuflen.") outbuf = Libc.malloc(outbuflen) if outbuf == C_NULL error("H5Zbzip2: memory allocation failed for bzip2 decompression.") @@ -107,7 +108,8 @@ function H5Z_filter_bzip2( # Prepare the output buffer outbuflen = nbytes + nbytes ÷ 100 + 600 # worse case (bzip2 docs) - outbuflen <= 0 && error("H5Zbzip2: Non-positive outbuflen for malloc: $outbuflen.") + outbuflen <= 0 && + error("H5Zbzip2: Non-positive outbuflen for malloc: $outbuflen.") outbuf = Libc.malloc(outbuflen) @debug "Allocated" outbuflen outbuf if outbuf == C_NULL diff --git a/ext/CodecLz4Ext/CodecLz4Ext.jl b/ext/CodecLz4Ext/CodecLz4Ext.jl index 38c96682..1070ab0a 100644 --- a/ext/CodecLz4Ext/CodecLz4Ext.jl +++ b/ext/CodecLz4Ext/CodecLz4Ext.jl @@ -128,7 +128,8 @@ function H5Z_filter_lz4( nBlocks = (nbytes - 1) ÷ blockSize + 1 maxDestSize = nBlocks * CodecLz4.LZ4_compressBound(blockSize) + 4 + 8 + nBlocks * 4 - maxDestSize <= 0 && error("H5Zlz4: Non-positive maxDestSize for malloc: $maxDestSize") + maxDestSize <= 0 && + error("H5Zlz4: Non-positive maxDestSize for malloc: $maxDestSize") outBuf = Libc.malloc(maxDestSize) outBuf == C_NULL && error("H5Zlz4: Could not allocate memory via malloc") diff --git a/ext/bitshuffle_jll_ext/bitshuffle_jll_ext.jl b/ext/bitshuffle_jll_ext/bitshuffle_jll_ext.jl index ac88c66b..476c896e 100644 --- a/ext/bitshuffle_jll_ext/bitshuffle_jll_ext.jl +++ b/ext/bitshuffle_jll_ext/bitshuffle_jll_ext.jl @@ -198,7 +198,7 @@ function H5Z_filter_bitshuffle( size = nbytes_uncomp ÷ elem_size buf_size_out <= 0 && error( - "bitshuffle_h5plugin: Non-positive buf_size_out for malloc: $buf_size_out" + "bitshuffle_h5plugin: Non-positive buf_size_out for malloc: $buf_size_out" ) out_buf = Libc.malloc(buf_size_out) if out_buf == C_NULL