Skip to content

Commit

Permalink
qgrep: fix -Wcalloc-transposed-args warning
Browse files Browse the repository at this point in the history
I get this warning when compiling portage-utils with
gcc (Gentoo 14.2.1_p20240817 p4) 14.2.1 20240817

Signed-off-by: Emanuele Torre <torreemanuele6@gmail.com>
  • Loading branch information
emanuele6 committed Sep 5, 2024
1 parent 8ffeecf commit 0ef3819
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qgrep.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 0ef3819

Please sign in to comment.