diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2023-12-21 11:47:45 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2024-01-12 01:59:45 +0100 |
commit | 6ff09b6b8c2fb6b3edda4ffaa173153a40653067 (patch) | |
tree | 8a050d65256096f0500ae3780882f1d49bb89765 /lib/test_fortify/write_overflow-strlcpy-src.c | |
parent | 02444f2ac26eae6385a65fcd66915084d15dffba (diff) |
btrfs: fix kvcalloc() arguments order in btrfs_ioctl_send()
When compiling with gcc version 14.0.0 20231220 (experimental)
and W=1, I've noticed the following warning:
fs/btrfs/send.c: In function 'btrfs_ioctl_send':
fs/btrfs/send.c:8208:44: warning: 'kvcalloc' sizes specified with 'sizeof'
in the earlier argument and not in the later argument [-Wcalloc-transposed-args]
8208 | sctx->clone_roots = kvcalloc(sizeof(*sctx->clone_roots),
| ^
Since 'n' and 'size' arguments of 'kvcalloc()' are multiplied to
calculate the final size, their actual order doesn't affect the result
and so this is not a bug. But it's still worth to fix it.
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'lib/test_fortify/write_overflow-strlcpy-src.c')
0 files changed, 0 insertions, 0 deletions