From 84e7a5dda209a96ea9fd7ab81f82547e115d3784 Mon Sep 17 00:00:00 2001 From: Emanuele Torre Date: Thu, 5 Sep 2024 13:39:35 +0200 Subject: [PATCH] qgrep: fix -Wcalloc-transposed-args warning I get this warning when compiling portage-utils with gcc (Gentoo 14.2.1_p20240817 p4) 14.2.1 20240817 --- qgrep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qgrep.c b/qgrep.c index 699f35b3..ad7a1262 100644 --- a/qgrep.c +++ b/qgrep.c @@ -555,7 +555,7 @@ int qgrep_main(int argc, char **argv) if (argc > (optind + 1)) { depend_atom **d = args.include_atoms = - xcalloc(sizeof(depend_atom *), (argc - optind - 1) + 1); + xcalloc((argc - optind - 1) + 1, sizeof(depend_atom *)); for (i = (optind + 1); i < argc; i++) { *d = atom_explode(argv[i]); if (*d == NULL) {