]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
misc: fix reversed calloc arguments
authorDarrick J. Wong <djwong@kernel.org>
Tue, 29 Jul 2025 20:14:14 +0000 (13:14 -0700)
committerAndrey Albershteyn <aalbersh@kernel.org>
Fri, 8 Aug 2025 11:39:09 +0000 (13:39 +0200)
commit466e8aa6e0e80a0a54a939b35d6e755d82c14435
tree84dc0c87ce933dc07477bb714bec52564c108771
parentf3fe5f5eecfaddcc6bd93817cc7b8f801a301d51
misc: fix reversed calloc arguments

gcc 14 complains about reversed arguments to calloc:

namei.c: In function ‘path_parse’:
namei.c:51:32: warning: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Wcalloc-transposed-args]
   51 |         dirpath = calloc(sizeof(*dirpath), 1);
      |                                ^
namei.c:51:32: note: earlier argument should specify number of elements, later size of each element

Fix all of these.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
db/namei.c
libxcmd/input.c
logprint/log_misc.c
repair/phase3.c
repair/quotacheck.c