fs/ntfs3: use kcalloc() instead of kzalloc()
authorLenko Donchev <lenko.donchev@gmail.com>
Sun, 11 Feb 2024 01:53:14 +0000 (19:53 -0600)
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Wed, 17 Apr 2024 12:06:27 +0000 (15:06 +0300)
commitcef359074cad6456aa060f4d701bd519a5c7baff
treefba1db64e573690ea461c771e7a24952e9afd45e
parent0bbac3facb5d6cc0171c45c9873a2dc96bea9680
fs/ntfs3: use kcalloc() instead of kzalloc()

We are trying to get rid of all multiplications from allocation
functions to prevent integer overflows[1]. Here the multiplication is
obviously safe, but using kcalloc() is more appropriate and improves
readability. This patch has no effect on runtime behavior.

Link: https://github.com/KSPP/linux/issues/162
Link: https://www.kernel.org/doc/html/next/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments
Signed-off-by: Lenko Donchev <lenko.donchev@gmail.com>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
fs/ntfs3/frecord.c