HomeFreeBSD

Cleanup: Use MIN() macro

Description

Cleanup: Use MIN() macro

The Linux 5.16.14 kernel's coccicheck caught this. The semantic
patch that caught it was:

./scripts/coccinelle/misc/minmax.cocci

There was a third opportunity to use MIN(), but that was in
FSE_minTableLog() in module/zstd/lib/compress/fse_compress.c.
Upstream zstd has yet to make this change and I did not want to change
header includes just for MIN, or do a one off, so I left it alone.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #14372

Details

Provenance
Richard Yao <richard.yao@alumni.stonybrook.edu>Authored on Jan 10 2023, 9:41 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Jan 13 2023, 12:00 AM
Parents
rGe6328fda2e5c: Cleanup: !A || A && B is equivalent to !A || B
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG3b2f9c1ec81a: Cleanup: Use MIN() macro (authored by Richard Yao <richard.yao@alumni.stonybrook.edu>).Jan 13 2023, 12:00 AM