Skip to content

Commit 2236fc0

Browse files
tobluxherbertx
authored andcommitted
crypto: zstd - Remove unnecessary size_t cast
Use max() instead of max_t() since zstd_cstream_workspace_bound() and zstd_dstream_workspace_bound() already return size_t and casting the values is unnecessary. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent 6cf3260 commit 2236fc0

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

crypto/zstd.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,8 @@ static void *zstd_alloc_stream(void)
3939

4040
params = zstd_get_params(ZSTD_DEF_LEVEL, ZSTD_MAX_SIZE);
4141

42-
wksp_size = max_t(size_t,
43-
zstd_cstream_workspace_bound(&params.cParams),
44-
zstd_dstream_workspace_bound(ZSTD_MAX_SIZE));
42+
wksp_size = max(zstd_cstream_workspace_bound(&params.cParams),
43+
zstd_dstream_workspace_bound(ZSTD_MAX_SIZE));
4544
if (!wksp_size)
4645
return ERR_PTR(-EINVAL);
4746

0 commit comments

Comments
 (0)