aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorTony Hutter <[email protected]>2024-04-29 11:31:50 -0700
committerTony Hutter <[email protected]>2024-04-29 13:50:05 -0700
commitef3fea63eb22ed07d941625d6893967d59fe179c (patch)
tree4513f749ce79d8352b8570617e762a0720b1c768 /cmd
parent71216b91d281e7e58f5e29ca4d4553945e080fe9 (diff)
GCC: Fixes for gcc 14 on Fedora 40
- Workaround dangling pointer in uu_list.c (#16124) - Fix calloc() transposed arguments in zpool_vdev_os.c - Make some temp variables unsigned to prevent triggering a '-Werror=alloc-size-larger-than' error. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tony Hutter <[email protected]> Closes #16124 Closes #16125
Diffstat (limited to 'cmd')
-rw-r--r--cmd/zpool/os/linux/zpool_vdev_os.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/zpool/os/linux/zpool_vdev_os.c b/cmd/zpool/os/linux/zpool_vdev_os.c
index 80627b582..f194d28c5 100644
--- a/cmd/zpool/os/linux/zpool_vdev_os.c
+++ b/cmd/zpool/os/linux/zpool_vdev_os.c
@@ -438,7 +438,7 @@ static char *zpool_sysfs_gets(char *path)
return (NULL);
}
- buf = calloc(sizeof (*buf), statbuf.st_size + 1);
+ buf = calloc(statbuf.st_size + 1, sizeof (*buf));
if (buf == NULL) {
close(fd);
return (NULL);