Silvan Jegen
unread,May 18, 2024, 5:30:41 AM5/18/24Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mbl...@googlegroups.com, Silvan Jegen
These were found through gcc warnings.
---
mflag.c | 2 +-
msort.c | 2 +-
mthread.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/mflag.c b/mflag.c
index ddf633c..9ee8747 100644
--- a/mflag.c
+++ b/mflag.c
@@ -145,7 +145,7 @@ main(int argc, char *argv[])
return 0;
}
- args = calloc(sizeof (char *), argsalloc);
+ args = calloc(argsalloc, sizeof (char *));
if (!args)
exit(-1);
diff --git a/msort.c b/msort.c
index 5d2d88d..02d1e42 100644
--- a/msort.c
+++ b/msort.c
@@ -319,7 +319,7 @@ main(int argc, char *argv[])
xpledge("stdio rpath", "");
- mails = calloc(sizeof (struct mail), mailalloc);
+ mails = calloc(mailalloc, sizeof (struct mail));
if (!mails)
exit(-1);
diff --git a/mthread.c b/mthread.c
index d200879..77fb21e 100644
--- a/mthread.c
+++ b/mthread.c
@@ -365,7 +365,7 @@ sort_tree(struct container *c, int depth)
if (i == 1) // no sort needed
return;
- struct container **a = calloc(sizeof (struct container *), i);
+ struct container **a = calloc(i, sizeof (struct container *));
if (!a)
return;
--
2.45.1